← Graph

Transaction Pooling

concept 2 connections

PgBouncer's most common and default pooling mode. Instead of giving each client a dedicated server connection, a connection is assigned from the pool per transaction. Improves throughput for scaled applications with many replicas but breaks any mechanism that relies on session state tied to a connection — including row-level security's current tenant parameter. Between statements the same 'logical' client may land on different backend connections, potentially one with a different tenant already set, leading to data leaks.

category
pattern
about
Transaction Pooling concept
Explained as PgBouncer's default mode and its interaction with session-scoped tenant state.
concept Transaction Pooling
related_to
PgBouncer tool
Default PgBouncer pooling mode.

Provenance

Read by
1 extraction