diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-11-17 18:00:25 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-11-17 18:00:25 +0000 |
commit | 91eb4895bb6c57face2edf30e20e16e6ab942ef1 (patch) | |
tree | cfbd90e4ac556bc7e16c46b542f3e733de323375 /src/include/access/multixact.h | |
parent | a2281c8e6f5ffe4fa67584f850bfa077e526115e (diff) |
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.
Diffstat (limited to 'src/include/access/multixact.h')
-rw-r--r-- | src/include/access/multixact.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/multixact.h b/src/include/access/multixact.h index 02f2d601c50..93b2bc73154 100644 --- a/src/include/access/multixact.h +++ b/src/include/access/multixact.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/multixact.h,v 1.7 2005/10/15 02:49:42 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/multixact.h,v 1.7.2.1 2006/11/17 18:00:25 tgl Exp $ */ #ifndef MULTIXACT_H #define MULTIXACT_H @@ -41,6 +41,7 @@ typedef struct xl_multixact_create extern MultiXactId MultiXactIdCreate(TransactionId xid1, TransactionId xid2); extern MultiXactId MultiXactIdExpand(MultiXactId multi, TransactionId xid); extern bool MultiXactIdIsRunning(MultiXactId multi); +extern bool MultiXactIdIsCurrent(MultiXactId multi); extern void MultiXactIdWait(MultiXactId multi); extern bool ConditionalMultiXactIdWait(MultiXactId multi); extern void MultiXactIdSetOldestMember(void); |