mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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:
parent
1cb018dd09
commit
7aeff9f4a4
@ -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…
Reference in New Issue
Block a user