From 06828c5febf3a8f9e94bce5bd84634ce990d299f Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Fri, 18 Feb 2011 11:31:49 +0000 Subject: Separate messages for standby replies and hot standby feedback. Allow messages to be sent at different times, and greatly reduce the frequency of hot standby feedback. Refactor to allow additional message types. --- src/include/replication/walprotocol.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/include/replication') diff --git a/src/include/replication/walprotocol.h b/src/include/replication/walprotocol.h index da94b6b2f30..9baca948a23 100644 --- a/src/include/replication/walprotocol.h +++ b/src/include/replication/walprotocol.h @@ -56,6 +56,18 @@ typedef struct XLogRecPtr flush; XLogRecPtr apply; + /* Sender's system clock at the time of transmission */ + TimestampTz sendTime; +} StandbyReplyMessage; + +/* + * Hot Standby feedback from standby (message type 'h'). This is wrapped within + * a CopyData message at the FE/BE protocol level. + * + * Note that the data length is not specified here. + */ +typedef struct +{ /* * The current xmin and epoch from the standby, for Hot Standby feedback. * This may be invalid if the standby-side does not support feedback, @@ -64,10 +76,9 @@ typedef struct TransactionId xmin; uint32 epoch; - /* Sender's system clock at the time of transmission */ TimestampTz sendTime; -} StandbyReplyMessage; +} StandbyHSFeedbackMessage; /* * Maximum data payload in a WAL data message. Must be >= XLOG_BLCKSZ. -- cgit v1.2.3