Commit 772d0f93 authored by Tom Lane's avatar Tom Lane

The recent DUMMY_PROCS patch broke accounting for the number of semaphores

needed.  This caused us to fail all the time on Darwin, and we'd fail for
some values of maxBackends on SysV-sema platforms, too.
parent 16cc9dff
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.141 2003/12/20 17:31:21 momjian Exp $ * $PostgreSQL: pgsql/src/backend/storage/lmgr/proc.c,v 1.142 2003/12/21 00:33:33 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -95,8 +95,8 @@ static bool CheckStatementTimeout(void); ...@@ -95,8 +95,8 @@ static bool CheckStatementTimeout(void);
int int
ProcGlobalSemas(int maxBackends) ProcGlobalSemas(int maxBackends)
{ {
/* We need a sema per backend, plus one for the dummy process. */ /* We need a sema per backend, plus one for each dummy process. */
return maxBackends + 1; return maxBackends + NUM_DUMMY_PROCS;
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment