projects
/
users
/
kgrittn
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cb018d
)
Ensure walsenders can be SIGTERMed while in non-walsender code
author
Magnus Hagander
<
[email protected]
>
Thu, 6 Oct 2011 19:43:14 +0000
(21:43 +0200)
committer
Magnus Hagander
<
[email protected]
>
Thu, 6 Oct 2011 19:43:14 +0000
(21:43 +0200)
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.
src/backend/replication/walsender.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/replication/walsender.c
b/src/backend/replication/walsender.c
index 5d1c5180f2d7ea1a9b6f79686fd2135c316c9432..c8fd165dcb3c58607bfd5e6cca56fa0ae765737f 100644
(file)
--- a/
src/backend/replication/walsender.c
+++ b/
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;
}