pgsql: Clean up after erroneous SELECT FOR UPDATE/SHARE on a sequence.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up after erroneous SELECT FOR UPDATE/SHARE on a sequence.
Date: 2011-06-02 19:32:41
Message-ID: E1QSDdJ-0006DS-DV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/bc0550f994539b4cd3b93487439c754e251fedb8

Modified Files
--------------
src/backend/commands/sequence.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2011-06-02 21:19:07 pgsql: Sort COMMENT synopsis and add more examples
Previous Message Robert Haas 2011-06-02 19:11:56 pgsql: Fix vim-induced typo.