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

Commit 7aeff9f

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 1cb018d commit 7aeff9f

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
@@ -1302,6 +1302,13 @@ WalSndShutdownHandler(SIGNAL_ARGS)
13021302
if (MyWalSnd)
13031303
SetLatch(&MyWalSnd->latch);
13041304

1305+
/*
1306+
* Set the standard (non-walsender) state as well, so that we can
1307+
* abort things like do_pg_stop_backup().
1308+
*/
1309+
InterruptPending = true;
1310+
ProcDiePending = true;
1311+
13051312
errno = save_errno;
13061313
}
13071314

0 commit comments

Comments
 (0)