On Wed, May 28, 2025 at 7:47 AM mark maker <mark@makr.zone> wrote:
Wow, great improvement, thanks!
The "tutorial-transactions" opens a new question that might be useful to know: when a transaction enters the aborted state at an early point in time (as has now become clear), does this mean it will also relinquish any locks and predicate locks early, or will it still hold onto those until explicitly rolled back by command?
I suppose if the system knows there are no savepoints in progress it could release the locks and whatnot...not sure if it knows that and acts upon that knowledge if it does. Easy enough to test with two psql sessions if you want to give it a go before I or someone else gets around to it.
Somewhat annoying feature of this behaviour is that when COMMIT is issued on an aborted transaction no error is reported.
Most drivers work around this problem by keeping track of the previous error and reporting an error on the COMMIT.