1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

The extra semaphore that proc.c now allocates for checkpoint processes

should be accounted for in the PROC_SEM_MAP_ENTRIES() macro.  Otherwise
the ports that rely on this macro to size data structures are broken.
Mea culpa.
This commit is contained in:
Tom Lane
2001-11-06 00:38:26 +00:00
parent 0053cebea5
commit ca7578d454
2 changed files with 11 additions and 6 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: proc.h,v 1.53 2001/11/05 17:46:35 momjian Exp $
* $Id: proc.h,v 1.54 2001/11/06 00:38:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -93,10 +93,12 @@ extern PROC *MyProc;
* in each set for identification purposes.)
*
* PROC_SEM_MAP_ENTRIES is the number of semaphore sets we need to allocate
* to keep track of up to maxBackends backends.
* to keep track of up to maxBackends backends. Note that we need one extra
* semaphore (see storage/lmgr/proc.c), so the computation may look wrong,
* but it's right.
*/
#define PROC_NSEMS_PER_SET 16
#define PROC_SEM_MAP_ENTRIES(maxBackends) (((maxBackends)-1)/PROC_NSEMS_PER_SET+1)
#define PROC_SEM_MAP_ENTRIES(maxBackends) ((maxBackends)/PROC_NSEMS_PER_SET+1)
typedef struct
{