diff options
Diffstat (limited to 'src/backend/postmaster/postmaster.c')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 997af5bf072..93e59258cc5 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2890,8 +2890,8 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) /* * Advance the postmaster's state machine and take actions as appropriate * - * This is common code for pmdie() and reaper(), which receive the signals - * that might mean we need to change state. + * This is common code for pmdie(), reaper() and sigusr1_handler(), which + * receive the signals that might mean we need to change state. */ static void PostmasterStateMachine(void) @@ -4284,6 +4284,13 @@ sigusr1_handler(SIGNAL_ARGS) WalReceiverPID = StartWalReceiver(); } + if (CheckPostmasterSignal(PMSIGNAL_ADVANCE_STATE_MACHINE) && + (pmState == PM_WAIT_BACKUP || pmState == PM_WAIT_BACKENDS)) + { + /* Advance postmaster's state machine */ + PostmasterStateMachine(); + } + if (CheckPromoteSignal() && StartupPID != 0 && (pmState == PM_STARTUP || pmState == PM_RECOVERY || pmState == PM_HOT_STANDBY || pmState == PM_WAIT_READONLY)) |