aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/postinit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-02-19 06:06:39 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-02-19 06:06:39 +0000
commite77b630cf0c1501008b3b72b5621f2951ef82b71 (patch)
tree6b25afa56af95f41ced9eab5e56f12eb58f03d7b /src/backend/utils/init/postinit.c
parent612b8434e40edc299e38bd6e4d7ac07183513118 (diff)
downloadpostgresql-e77b630cf0c1501008b3b72b5621f2951ef82b71.tar.gz
postgresql-e77b630cf0c1501008b3b72b5621f2951ef82b71.zip
Allow maximum number of backends to be set at configure time
(--with-maxbackends). Add a postmaster switch (-N backends) that allows the limit to be reduced at postmaster start time. (You can't increase it, sorry to say, because there are still some fixed-size arrays.) Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at postmaster startup, so that this particular form of bogus configuration is exposed immediately rather than under heavy load.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r--src/backend/utils/init/postinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 5f94168334c..0d60403e322 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.37 1999/02/13 23:20:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.38 1999/02/19 06:06:10 tgl Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
@@ -571,7 +571,7 @@ InitPostgres(char *name) /* database name */
*/
InitProcess(PostgresIpcKey);
- if (MyBackendId > MaxBackendId || MyBackendId <= 0)
+ if (MyBackendId > MAXBACKENDS || MyBackendId <= 0)
{
elog(FATAL, "cinit2: bad backend id %d (%d)",
MyBackendTag,