Skip to content

PostgreSQL Connection Pooling

Choose by session state, connection origin, and deployment model. Check your ORM’s connection requirements before migrations.

Direct connection

Long-lived / Migrations

Migrations, long-lived backends, and workloads that rely on session state.

Note: Each connection consumes a database connection slot.

Session pool

Full session state

Clients that need session state across transactions.

Note: A server connection remains assigned for the client session.

Transaction pool

High concurrency

High-concurrency short transactions, such as serverless APIs.

Note: Revisit cross-transaction SET, temporary objects, and session locks. Check prepared statements against the driver and pooler.

Popular poolers & official docs