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

Commit 2f994e4

Browse files
committed
Extra semaphores
1 parent a3c7add commit 2f994e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/backend/storage/lmgr/proc.c

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

138138
/*

src/include/storage/proc.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ extern PGPROC *PreparedXactProcs;
278278
*/
279279
#define NUM_AUXILIARY_PROCS 4
280280

281+
/*
282+
* Number of extra semaphores used by Postgres (right now 3 semaphores are used by multimaster)
283+
*/
284+
#define NUM_EXTRA_SEMAPHORES 4
285+
281286
/* configurable options */
282287
extern PGDLLIMPORT int DeadlockTimeout;
283288
extern int StatementTimeout;

0 commit comments

Comments
 (0)