Content-Length: 265020 | pFad | http://github.com/postgrespro/postgres/commit/7aeff9f4a4e57dca5727828bf95f12cf63003270

3F Ensure walsenders can be SIGTERMed while in non-walsender code · postgrespro/postgres@7aeff9f · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/7aeff9f4a4e57dca5727828bf95f12cf63003270

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy