4 ms·
Wondering about pgbouncer: A postgres connection can have state attached, e.g. with 'set'. Does pgbouncer save and restore state, with associated perf cost, or
by hyperman1 4y ago
Wondering about pgbouncer: A postgres connection can have state attached, e.g. with 'set'. Does pgbouncer save and restore state, with associated perf cost, or does any pooled connection just receive the random state from the previous connection owner, assuming all state should be identical?
- sqlcommando 4y agopgbouncer supports session and transaction pooling. With session pooling a connection will be associated with the same session throughout its use. With transaction pooling each transaction on the connection could potentially get a different session.
- atombender 4y agoIt's configurable. The default in "session pooling" mode is to run DISCARD ALL to reset the connection for reuse.