]> granicus.if.org Git - postgresql/commit
Clean up after erroneous SELECT FOR UPDATE/SHARE on a sequence.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Jun 2011 19:31:14 +0000 (15:31 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Jun 2011 19:31:14 +0000 (15:31 -0400)
commit918eb0f34f2af3e0d2823a164d22b6906d46dfcd
tree09fd57a20b0fa0de6d546263bf0a2dae04084ecb
parent23138a5203fe14d6adf5019482f341ebfe2136ad
Clean up after erroneous SELECT FOR UPDATE/SHARE on a sequence.

My previous commit disallowed this operation, but did nothing about
cleaning up the damage if one had already been done.  With the operation
disallowed, it's okay to just forcibly clear xmax in a sequence's tuple,
since any value seen there could not represent a live transaction's lock.
So, any sequence-specific operation will repair the problem automatically,
whether or not the user has already seen "could not access status of
transaction" failures.
src/backend/commands/sequence.c