aboutsummaryrefslogtreecommitdiff
path: root/src/include/storage/lmgr.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-12-09 01:22:04 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-12-09 01:22:04 +0000
commitc599a247bbe55a29737c78e122b77de34c8bf917 (patch)
tree05e3a75573a107dd24c47ef632e95829a5f16e43 /src/include/storage/lmgr.h
parent34848052d0fcf5d6efcbe387ad029c41508e2906 (diff)
downloadpostgresql-c599a247bbe55a29737c78e122b77de34c8bf917.tar.gz
postgresql-c599a247bbe55a29737c78e122b77de34c8bf917.zip
Simplify lock manager data structures by making a clear separation between
the data defining the semantics of a lock method (ie, conflict resolution table and ancillary data, which is all constant) and the hash tables storing the current state. The only thing we give up by this is the ability to use separate hashtables for different lock methods, but there is no need for that anyway. Put some extra fields into the LockMethod definition structs to clean up some other uglinesses, like hard-wired tests for DEFAULT_LOCKMETHOD and USER_LOCKMETHOD. This commit doesn't do anything about the performance issues we were discussing, but it clears away some of the underbrush that's in the way of fixing that.
Diffstat (limited to 'src/include/storage/lmgr.h')
-rw-r--r--src/include/storage/lmgr.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h
index 730060a3480..3e64dea91f8 100644
--- a/src/include/storage/lmgr.h
+++ b/src/include/storage/lmgr.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.52 2005/10/15 02:49:46 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/storage/lmgr.h,v 1.53 2005/12/09 01:22:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,29 +18,6 @@
#include "utils/rel.h"
-/* These are the valid values of type LOCKMODE: */
-
-/* NoLock is not a lock mode, but a flag value meaning "don't get a lock" */
-#define NoLock 0
-
-#define AccessShareLock 1 /* SELECT */
-#define RowShareLock 2 /* SELECT FOR UPDATE/FOR SHARE */
-#define RowExclusiveLock 3 /* INSERT, UPDATE, DELETE */
-#define ShareUpdateExclusiveLock 4 /* VACUUM (non-FULL) */
-#define ShareLock 5 /* CREATE INDEX */
-#define ShareRowExclusiveLock 6 /* like EXCLUSIVE MODE, but allows ROW
- * SHARE */
-#define ExclusiveLock 7 /* blocks ROW SHARE/SELECT...FOR
- * UPDATE */
-#define AccessExclusiveLock 8 /* ALTER TABLE, DROP TABLE, VACUUM
- * FULL, and unqualified LOCK TABLE */
-
-/*
- * Note: all lock mode numbers must be less than lock.h's MAX_LOCKMODES,
- * so increase that if you want to add more modes.
- */
-
-extern void InitLockTable(void);
extern void RelationInitLockInfo(Relation relation);
/* Lock a relation */