Ensure walsenders can be SIGTERMed while in non-walsender code

In oder to exit on SIGTERM when in non-walsender code,
such as do_pg_stop_backup(), we need to set the interrupt
variables that are used there, and not just the walsender
local ones.
This commit is contained in:
Magnus Hagander 2011-10-06 21:43:14 +02:00
parent 1cb018dd09
commit 7aeff9f4a4

View File

@ -1302,6 +1302,13 @@ WalSndShutdownHandler(SIGNAL_ARGS)
if (MyWalSnd)
SetLatch(&MyWalSnd->latch);
/*
* Set the standard (non-walsender) state as well, so that we can
* abort things like do_pg_stop_backup().
*/
InterruptPending = true;
ProcDiePending = true;
errno = save_errno;
}