aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-02-23 18:28:46 +0000
committerBruce Momjian <bruce@momjian.us>2001-02-23 18:28:46 +0000
commit81b48493aa34ca75602f7453ca134c542687809c (patch)
tree5175ef4980284ab3fc788b68d6fba98f1b1ad67d
parent10bfaf58d2c8c8f156c0d0308d5cc25aa0a9c3c3 (diff)
downloadpostgresql-81b48493aa34ca75602f7453ca134c542687809c.tar.gz
postgresql-81b48493aa34ca75602f7453ca134c542687809c.zip
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Is there one LOCKMETHODCTL for every backend? I thought there was only > one of them. >> >> You're right, that line is erroneous; it should read >> >> size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL)); >> >> Not a significant error but it should be changed for clarity ...
-rw-r--r--src/backend/storage/lmgr/lock.c5
-rw-r--r--src/include/storage/lock.h7
2 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 5ac8211dc4f..bb134e0177b 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.83 2001/02/22 23:20:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.84 2001/02/23 18:28:46 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -1411,8 +1411,7 @@ LockShmemSize(int maxBackends)
size += MAXALIGN(sizeof(PROC_HDR)); /* ProcGlobal */
size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
- size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* each
- * lockMethodTable->ctl */
+ size += MAXALIGN(MAX_LOCK_METHODS * sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
/* lockHash table */
size += hash_estimate_size(NLOCKENTS(maxBackends),
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index 9c71366d71c..653ca9936ae 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.45 2001/02/22 23:02:33 momjian Exp $
+ * $Id: lock.h,v 1.46 2001/02/23 18:28:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -79,7 +79,8 @@ typedef int LOCKMETHOD;
/*
* This is the control structure for a lock table. It
- * lives in shared memory:
+ * lives in shared memory. This information is the same
+ * for all backends.
*
* lockmethod -- the handle used by the lock table's clients to
* refer to the type of lock table being used.
@@ -107,7 +108,7 @@ typedef struct LOCKMETHODCTL
} LOCKMETHODCTL;
/*
- * Non-shared header for a lock table.
+ * Eack backend has a non-shared lock table header.
*
* lockHash -- hash table holding per-locked-object lock information
* holderHash -- hash table holding per-lock-holder lock information