projects
/
2ndquadrant_bdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7efbe8
)
The apply worker wasn't checking for postmaster death when paused
author
Craig Ringer
<craig@2ndquadrant.com>
Thu, 16 Apr 2015 08:09:24 +0000
(16:09 +0800)
committer
Craig Ringer
<craig@2ndquadrant.com>
Mon, 20 Apr 2015 13:17:54 +0000
(21:17 +0800)
Fixes #58
bdr_apply.c
patch
|
blob
|
blame
|
history
diff --git
a/bdr_apply.c
b/bdr_apply.c
index 826fd3b857a80bb6d2de374a3596bc42d38b838c..d6a653f7109514d3f8579aff75fd38a1d49d36b1 100644
(file)
--- a/
bdr_apply.c
+++ b/
bdr_apply.c
@@
-2384,7
+2384,12
@@
bdr_apply_work(PGconn* streamConn)
while (BdrWorkerCtl->pause_apply && !IsTransactionState())
{
ResetLatch(&MyProc->procLatch);
- rc = WaitLatch(&MyProc->procLatch, WL_TIMEOUT, 1000L);
+ rc = WaitLatch(&MyProc->procLatch,
+ WL_TIMEOUT | WL_LATCH_SET | WL_POSTMASTER_DEATH,
+ 1000L);
+
+ if (rc & WL_POSTMASTER_DEATH)
+ proc_exit(1);
}
MemoryContextResetAndDeleteChildren(MessageContext);
}