diff options
| author | Simon Riggs | 2011-02-18 11:31:49 +0000 |
|---|---|---|
| committer | Simon Riggs | 2011-02-18 11:31:49 +0000 |
| commit | 06828c5febf3a8f9e94bce5bd84634ce990d299f (patch) | |
| tree | a869c97041ef1b8e27c7b86e60c2bc7cd082cf5f /src/include/replication | |
| parent | 45a6d79b1764a78301ef008f4561b5e176352331 (diff) | |
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.
Diffstat (limited to 'src/include/replication')
| -rw-r--r-- | src/include/replication/walprotocol.h | 15 |
1 files changed, 13 insertions, 2 deletions
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. |
