node-pg-large-object icon indicating copy to clipboard operation
node-pg-large-object copied to clipboard

Callback examples fail to close the transaction

Open vitaly-t opened this issue 7 years ago • 0 comments

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.

vitaly-t avatar Mar 11 '17 20:03 vitaly-t