diff options
Diffstat (limited to 'src/backend/storage')
-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 677042962a0..5ae1506038c 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -280,6 +280,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). * @@ -452,6 +459,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. * |