Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback examples fail to close the transaction #5

Open
vitaly-t opened this issue Mar 11, 2017 · 0 comments
Open

Callback examples fail to close the transaction #5

vitaly-t opened this issue Mar 11, 2017 · 0 comments

Comments

@vitaly-t
Copy link

vitaly-t commented Mar 11, 2017

Every transaction must terminate with either COMMIT or ROLLBACK.

Failure to do so leaves the transaction open. And since you always rely on the connection pool, you will end up executing unrelated queries inside your transaction context.

When using pg-promise, the ROLLBACK is executed automatically when the transaction errors, but all of the callback examples provided here do not do that, and need to be corrected.

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

No branches or pull requests

1 participant