mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
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>
This commit is contained in:
parent
2e02136fe6
commit
06bfb801c7
@ -370,7 +370,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
|
|||||||
AddWaitEventToSet(set, WL_LATCH_SET, PGINVALID_SOCKET,
|
AddWaitEventToSet(set, WL_LATCH_SET, PGINVALID_SOCKET,
|
||||||
(Latch *) latch, NULL);
|
(Latch *) latch, NULL);
|
||||||
|
|
||||||
if (wakeEvents & WL_POSTMASTER_DEATH)
|
if (wakeEvents & WL_POSTMASTER_DEATH && IsUnderPostmaster)
|
||||||
AddWaitEventToSet(set, WL_POSTMASTER_DEATH, PGINVALID_SOCKET,
|
AddWaitEventToSet(set, WL_POSTMASTER_DEATH, PGINVALID_SOCKET,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user