mirror of
https://github.com/postgres/postgres.git
synced 2026-03-13 06:06:25 -04:00
Fix the number of lwlocks needed by the "fast path" lock patch. It needs
one lock per backend or auxiliary process - the need for a lock for each aux processes was not accounted for in NumLWLocks(). No-one noticed, because the three locks needed for the three aux processes fit into the few extra lwlocks we allocate for 3rd party modules that don't call RequestAddinLWLocks() (NUM_USER_DEFINED_LWLOCKS, 4 by default).
This commit is contained in:
parent
051d1ba7a0
commit
cbf65509bb
1 changed files with 2 additions and 2 deletions
|
|
@ -167,8 +167,8 @@ NumLWLocks(void)
|
|||
/* bufmgr.c needs two for each shared buffer */
|
||||
numLocks += 2 * NBuffers;
|
||||
|
||||
/* lock.c needs one per backend */
|
||||
numLocks += MaxBackends;
|
||||
/* proc.c needs one for each backend or auxiliary process */
|
||||
numLocks += MaxBackends + NUM_AUXILIARY_PROCS;
|
||||
|
||||
/* clog.c needs one per CLOG buffer */
|
||||
numLocks += NUM_CLOG_BUFFERS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue