pgsql: Fix bugs in SSI tuple locking. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix bugs in SSI tuple locking.
Date
Msg-id E1VTIEt-0005TV-W2@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
REL9_3_STABLE

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

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


pgsql-committers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix bugs in SSI tuple locking.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: TYPEALIGN doesn't work on int64 on 32-bit platforms.