From: Peter Eisentraut Date: Sat, 3 Jun 2017 03:02:13 +0000 (-0400) Subject: Ignore WL_POSTMASTER_DEATH latch event in single user mode X-Git-Tag: XL_10_R1BETA1~274^2~87 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=06bfb801c73c89e66f44c1cf693386793e98b637;p=postgres-xl.git 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 --- diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 53e6bf2477..55959de91f 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -370,7 +370,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock, AddWaitEventToSet(set, WL_LATCH_SET, PGINVALID_SOCKET, (Latch *) latch, NULL); - if (wakeEvents & WL_POSTMASTER_DEATH) + if (wakeEvents & WL_POSTMASTER_DEATH && IsUnderPostmaster) AddWaitEventToSet(set, WL_POSTMASTER_DEATH, PGINVALID_SOCKET, NULL, NULL);