]> 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:22 +0000 (15:31 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Jun 2011 19:31:22 +0000 (15:31 -0400)
commit19fed6429575ce4f6bc5d24e434f56ca029595fa
treee03e6080d1e686dd7efdb605e15def0741e929b5
parentd369ddd9f1d5908e36616e5b9e953ecefde43be4
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