pgsql: Fix bugs in SSI tuple locking.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bugs in SSI tuple locking.
Date: 2013-10-07 21:21:15
Message-ID: E1VTIEt-0005TS-Tm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Fix bugs in SSI tuple locking.

1. In heap_hot_search_buffer(), the PredicateLockTuple() call is passed
wrong offset number. heapTuple->t_self is set to the tid of the first
tuple in the chain that's visited, not the one actually being read.

2. CheckForSerializableConflictIn() uses the tuple's t_ctid field
instead of t_self to check for exiting predicate locks on the tuple. If
the tuple was updated, but the updater rolled back, t_ctid points to the
aborted dead tuple.

Reported by Hannu Krosing. Backpatch to 9.1.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/81fbbfe3352d3965ee3d8eaafe164b2335c43f72

Modified Files
--------------
src/backend/access/heap/heapam.c | 4 +++-
src/backend/storage/lmgr/predicate.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-10-07 21:21:16 pgsql: Fix bugs in SSI tuple locking.
Previous Message Peter Eisentraut 2013-10-07 20:53:12 pgsql: Translation updates

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-10-07 21:42:52 Re: [COMMITTERS] pgsql: Fix bugs in SSI tuple locking.
Previous Message Kevin Grittner 2013-10-07 21:06:52 Re: SSI freezing bug