Postgresql – Understanding “server”

pgbouncerpostgresql

pgBouncer docs note:

pool_mode

Specifies when a server connection can be reused by other clients.

session:
Server is released back to pool after client disconnects. Default.

transaction:
Server is released back to pool after transaction finishes.

Please explain what “server connection can be reused” and “server is released back to the pool” mean.

Best Answer

I think that in this two lines "server" means: connection to PostgreSQL managed by pgbouncer. "Server connection can be reused" means that established connection to postgreSQL is not closed but kept open and will be used by another client. In this context I understand that "server is released back" to the pool means the same thing: the connection to PostgreSQL is kept open and will be used by another client.

This is just the way connexion pooling works.