diff options
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 8593713e78f..1dda2f81c30 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -292,6 +292,13 @@ InitProcess(void) elog(ERROR, "you already exist"); /* + * Initialize process-local latch support. This could fail if the kernel + * is low on resources, and if so we want to exit cleanly before acquiring + * any shared-memory resources. + */ + InitializeLatchSupport(); + + /* * Try to get a proc struct from the free list. If this fails, we must be * out of PGPROC structures (not to mention semaphores). * @@ -465,6 +472,13 @@ InitAuxiliaryProcess(void) elog(ERROR, "you already exist"); /* + * Initialize process-local latch support. This could fail if the kernel + * is low on resources, and if so we want to exit cleanly before acquiring + * any shared-memory resources. + */ + InitializeLatchSupport(); + + /* * We use the ProcStructLock to protect assignment and releasing of * AuxiliaryProcs entries. * |