aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-10-07 20:11:03 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-10-07 20:11:03 +0000
commitbb55e583f64618ffbdfb7e19949d2f7cca5788e5 (patch)
tree5e1c3fde1bf0900985e673993ba8af8cc68f9ee3
parent426d0158cafe5d138ce15c640134b2db8f37f6dc (diff)
downloadpostgresql-bb55e583f64618ffbdfb7e19949d2f7cca5788e5.tar.gz
postgresql-bb55e583f64618ffbdfb7e19949d2f7cca5788e5.zip
Allocate a few extra LWLocks for possible use by add-on modules.
Per request from Marc Munro.
-rw-r--r--src/backend/storage/lmgr/lwlock.c5
-rw-r--r--src/include/pg_config_manual.h7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index aeacaf102aa..d649e0bd712 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.30 2005/09/16 00:30:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.31 2005/10/07 20:11:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -140,7 +140,8 @@ NumLWLocks(void)
*/
numLocks += 2 * NUM_SLRU_BUFFERS;
- /* Perhaps create a few more for use by user-defined modules? */
+ /* Leave a few extra for use by user-defined modules. */
+ numLocks += NUM_USER_DEFINED_LWLOCKS;
return numLocks;
}
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index bf82771d45c..0a97859ee25 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -6,7 +6,7 @@
* for developers. If you edit any of these, be sure to do a *full*
* rebuild (and an initdb if noted).
*
- * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.17 2005/10/03 22:55:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.18 2005/10/07 20:11:03 tgl Exp $
*------------------------------------------------------------------------
*/
@@ -75,6 +75,11 @@
#define INDEX_MAX_KEYS 32
/*
+ * Number of spare LWLocks to allocate for user-defined add-on code.
+ */
+#define NUM_USER_DEFINED_LWLOCKS 4
+
+/*
* Define this to make libpgtcl's "pg_result -assign" command process
* C-style backslash sequences in returned tuple data and convert
* PostgreSQL array values into Tcl lists. CAUTION: This conversion