Skip to content

Commit cbf6550

Browse files
committed
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).
1 parent 051d1ba commit cbf6550

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/storage/lmgr/lwlock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ NumLWLocks(void)
167167
/* bufmgr.c needs two for each shared buffer */
168168
numLocks += 2 * NBuffers;
169169

170-
/* lock.c needs one per backend */
171-
numLocks += MaxBackends;
170+
/* proc.c needs one for each backend or auxiliary process */
171+
numLocks += MaxBackends + NUM_AUXILIARY_PROCS;
172172

173173
/* clog.c needs one per CLOG buffer */
174174
numLocks += NUM_CLOG_BUFFERS;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy