Teach AbortOutOfAnyTransaction to clean up partially-started transactions.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: cc2469b0925812424efc8aa24234fc3090a5e85e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-05-29T03:57:14Z
Releases: 9.1.4
Teach AbortOutOfAnyTransaction to clean up partially-started transactions.

AbortOutOfAnyTransaction failed to do anything if the state it saw on
entry corresponded to failing partway through StartTransaction.  I fixed
AbortCurrentTransaction to cope with that case way back in commit
60b2444cc3ba037630c9b940c3c9ef01b954b87b, but evidently overlooked that
AbortOutOfAnyTransaction should do likewise.

Back-patch to all supported branches.  It's not clear that this omission
has any more-than-cosmetic consequences, but it's also not clear that it
doesn't, so back-patching seems the least risky choice.

Files

PathChange+/−
src/backend/access/transam/xact.c modified +18 −1