summaryrefslogtreecommitdiff
path: root/src/include/replication
diff options
context:
space:
mode:
authorAndres Freund2015-01-17 12:00:42 +0000
committerAndres Freund2015-01-17 12:00:42 +0000
commitff44fba46c09c37dd9e60da1cb0b3a9339eb085f (patch)
treec7200c94c36c93da2284087d1d645618994e1935 /src/include/replication
parent20af53d7191f84d0f5b86da4362e481b7e85d52a (diff)
Replace walsender's latch with the general shared latch.
Relying on the normal shared latch simplifies interrupt/signal handling because we can rely on all signal handlers setting the proc latch. That in turn allows us to avoid the use of ImmediateInterruptOK, which arguably isn't correct because WaitLatchOrSocket isn't declared to be immediately interruptible. Also change sections that wait on the walsender's latch to notice interrupts quicker/more reliably and make them more consistent with each other. This is part of a larger "get rid of ImmediateInterruptOK" series. Discussion: 20150115020335.GZ5245@awork2.anarazel.de
Diffstat (limited to 'src/include/replication')
-rw-r--r--src/include/replication/walsender_private.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h
index cc351d6f673..88677506f34 100644
--- a/src/include/replication/walsender_private.h
+++ b/src/include/replication/walsender_private.h
@@ -51,10 +51,10 @@ typedef struct WalSnd
slock_t mutex;
/*
- * Latch used by backends to wake up this walsender when it has work to
- * do.
+ * Pointer to the walsender's latch. Used by backends to wake up this
+ * walsender when it has work to do. NULL if the walsender isn't active.
*/
- Latch latch;
+ Latch *latch;
/*
* The priority order of the standby managed by this WALSender, as listed