Open daurnimator opened 5 years ago
When a connection is released back to the pool, the connection should be reset to a clean state. This should probably be done by running
rollback; discard all;
Alternatively/additionally, you should expose an event for a connection being added back to the pool. This would allow the query to be customisable.
Other pooling implementations have similar facilities, e.g. pgbouncer has the configuration parameter server_reset_query
server_reset_query
(Formerly brianc/node-postgres#391 – from when the pool was part of pg)
When a connection is released back to the pool, the connection should be reset to a clean state. This should probably be done by running
Alternatively/additionally, you should expose an event for a connection being added back to the pool. This would allow the query to be customisable.
Other pooling implementations have similar facilities, e.g. pgbouncer has the configuration parameter
server_reset_query