]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix bugs in SSI tuple locking.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 7 Oct 2013 20:57:40 +0000 (23:57 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 7 Oct 2013 21:14:15 +0000 (00:14 +0300)
commit42c63cafb2af32795afa7dd5d3690186af313785
treedddcd8622cceca1b2ea4ff5377987b57fd7dce60
parent1c4dfd19a6ebb3c2a0471f0a57b9f13d0ccd9d02
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.
src/backend/access/heap/heapam.c
src/backend/storage/lmgr/predicate.c