Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5df22bb

Browse files
committed
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.
1 parent 5308abf commit 5df22bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/backend/replication/walsender.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,13 @@ WalSndShutdownHandler(SIGNAL_ARGS)
12071207
if (MyWalSnd)
12081208
SetLatch(&MyWalSnd->latch);
12091209

1210+
/*
1211+
* Set the standard (non-walsender) state as well, so that we can
1212+
* abort things like do_pg_stop_backup().
1213+
*/
1214+
InterruptPending = true;
1215+
ProcDiePending = true;
1216+
12101217
errno = save_errno;
12111218
}
12121219

0 commit comments

Comments
 (0)