diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-06-02 23:02:13 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-06-05 21:03:35 -0400 |
commit | 06bfb801c73c89e66f44c1cf693386793e98b637 (patch) | |
tree | abed37ffbfb82f9580793d3b705dd9d17dc96f99 /src | |
parent | 2e02136fe688046cd3b3c0bbcdd6ba970932ec8e (diff) | |
download | postgresql-06bfb801c73c89e66f44c1cf693386793e98b637.tar.gz postgresql-06bfb801c73c89e66f44c1cf693386793e98b637.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/ipc/latch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 53e6bf2477d..55959de91f3 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); |