Skip to content

Commit 06bfb80

Browse files
committed
Ignore WL_POSTMASTER_DEATH latch event in single user mode
Otherwise code that uses this will abort with an assertion failure, because postmaster_alive_fds are not initialized. Reported-by: tushar <tushar.ahuja@enterprisedb.com>
1 parent 2e02136 commit 06bfb80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/storage/ipc/latch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
370370
AddWaitEventToSet(set, WL_LATCH_SET, PGINVALID_SOCKET,
371371
(Latch *) latch, NULL);
372372

373-
if (wakeEvents & WL_POSTMASTER_DEATH)
373+
if (wakeEvents & WL_POSTMASTER_DEATH && IsUnderPostmaster)
374374
AddWaitEventToSet(set, WL_POSTMASTER_DEATH, PGINVALID_SOCKET,
375375
NULL, NULL);
376376

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