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.
pull/1/head
Magnus Hagander 14 years ago
parent 1cb018dd09
commit 7aeff9f4a4
  1. 7
      src/backend/replication/walsender.c

@ -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;
}

Loading…
Cancel
Save