Closed ken-futureverse closed 2 years ago
any chance this and #110 get reviewed and merge?
The point of ROLLBACK
query is to keep the connection in a clean state. That doesn't happen when you time out rollback query like this PR suggests. You could omit rollback query entirely with the same effect.
As of why ROLLBACK
hangs - this is a node-postgres issue which doesn't properly handle serialization errors and leaves the client state corrupted after those.
@eldargab I agreed, it's an issue on node-postgres
, but don't you think it's better to throw and terminate the process if the ROLLBACK query takes a long time? Or perhaps a WARN so at least the dev knows what's going on?
Closes #109