diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-31 20:09:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-31 20:09:10 +0000 |
commit | 09d3670df3e4593be1d2299a62d982829016b847 (patch) | |
tree | 7a62e91c1cf595d0334dd2c196d1c79835cc267b /src/include/storage/lock.h | |
parent | 4cd72b53b9975bab5f4ca0792cf4f54c84829404 (diff) | |
download | postgresql-09d3670df3e4593be1d2299a62d982829016b847.tar.gz postgresql-09d3670df3e4593be1d2299a62d982829016b847.zip |
Change the relation_open protocol so that we obtain lock on a relation
(table or index) before trying to open its relcache entry. This fixes
race conditions in which someone else commits a change to the relation's
catalog entries while we are in process of doing relcache load. Problems
of that ilk have been reported sporadically for years, but it was not
really practical to fix until recently --- for instance, the recent
addition of WAL-log support for in-place updates helped.
Along the way, remove pg_am.amconcurrent: all AMs are now expected to support
concurrent update.
Diffstat (limited to 'src/include/storage/lock.h')
-rw-r--r-- | src/include/storage/lock.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 7a2651cd28f..208b4a93ccc 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.96 2006/07/23 23:08:46 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lock.h,v 1.97 2006/07/31 20:09:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -349,7 +349,6 @@ typedef struct LOCALLOCK /* data */ LOCK *lock; /* associated LOCK object in shared mem */ PROCLOCK *proclock; /* associated PROCLOCK object in shmem */ - bool isTempObject; /* true if lock is on a temporary object */ uint32 hashcode; /* copy of LOCKTAG's hash value */ int nLocks; /* total number of times lock is held */ int numLockOwners; /* # of relevant ResourceOwners */ @@ -405,7 +404,6 @@ extern void InitLocks(void); extern LockMethod GetLocksMethodTable(const LOCK *lock); extern uint32 LockTagHashCode(const LOCKTAG *locktag); extern LockAcquireResult LockAcquire(const LOCKTAG *locktag, - bool isTempObject, LOCKMODE lockmode, bool sessionLock, bool dontWait); |