Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4bd28bf

Browse files
committed
Reserver NUM_EXTRA_SEMAPHORES for multimaster
1 parent d19102c commit 4bd28bf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/backend/storage/lmgr/proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ProcGlobalSemas(void)
130130
* We need a sema per backend (including autovacuum), plus one for each
131131
* auxiliary process.
132132
*/
133-
return MaxBackends + NUM_AUXILIARY_PROCS;
133+
return MaxBackends + NUM_AUXILIARY_PROCS + NUM_EXTRA_SEMAPHORES;
134134
}
135135

136136
/*

src/include/storage/proc.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ extern PGPROC *PreparedXactProcs;
260260
*/
261261
#define NUM_AUXILIARY_PROCS 4
262262

263+
/*
264+
* Number of extra semaphores used by Postgres (right now 3 semaphores are used by multimaster)
265+
*/
266+
#define NUM_EXTRA_SEMAPHORES 4
263267

264268
/* configurable options */
265269
extern int PGDLLIMPORT DeadlockTimeout;

0 commit comments

Comments
 (0)