Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

release should reset state of connection #122

Open
daurnimator opened this issue Mar 14, 2019 · 1 comment
Open

release should reset state of connection #122

daurnimator opened this issue Mar 14, 2019 · 1 comment

Comments

@daurnimator
Copy link

daurnimator commented Mar 14, 2019

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

@charmander
Copy link
Collaborator

(Formerly brianc/node-postgres#391 – from when the pool was part of pg)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants