OSDN Git Service

Repair two related errors in heap_lock_tuple: it was failing to recognize
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Nov 2006 18:00:15 +0000 (18:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Nov 2006 18:00:15 +0000 (18:00 +0000)
commit4f335a3d7fda4b4a0efd4568ac61d036098d951a
tree76277f2c8c5abc7e61967fc3fb828f7a2afe1bf5
parentb6b5aa102b3e53742a59e686ef58f382159ec3c0
Repair two related errors in heap_lock_tuple: it was failing to recognize
cases where we already hold the desired lock "indirectly", either via
membership in a MultiXact or because the lock was originally taken by a
different subtransaction of the current transaction.  These cases must be
accounted for to avoid needless deadlocks and/or inappropriate replacement of
an exclusive lock with a shared lock.  Per report from Clarence Gardner and
subsequent investigation.
src/backend/access/heap/heapam.c
src/backend/access/transam/multixact.c
src/backend/utils/time/tqual.c
src/include/access/multixact.h