Re:Tips for a Healthier Postgres Database
by hyperman1 on Saturday February 11, 2023 @03:31PM
(#34756059)
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?
[ Parent
| on HN ]
Re:Tips for a Healthier Postgres Database
by sqlcommando on Saturday February 11, 2023 @03:36PM
(#34756093)
pgbouncer 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.
Re:Tips for a Healthier Postgres Database
by atombender on Saturday February 11, 2023 @06:22PM
(#34757508)
It's configurable. The default in "session pooling" mode is to run DISCARD ALL to reset the connection for reuse.