From 808969d0e7ac2d2fdbd915c6a6ac9ec68b6f63f9 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 3 Feb 2010 09:47:19 +0000 Subject: Add a message type header to the CopyData messages sent from primary to standby in streaming replication. While we only have one message type at the moment, adding a message type header makes this easier to extend. --- doc/src/sgml/protocol.sgml | 61 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 54e03998ff9..845e4181307 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1,4 +1,4 @@ - + Frontend/Backend Protocol @@ -4179,12 +4179,65 @@ The commands accepted in walsender mode are: already been recycled. On success, server responds with a CopyOutResponse message, and backend starts to stream WAL as CopyData messages. + The payload in CopyData message consists of the following format. - The payload in each CopyData message consists of an XLogRecPtr, - indicating the starting point of the WAL in the message, immediately - followed by the WAL data itself. + + + + XLogData (B) + + + + + + + Byte1('w') + + + + Identifies the message as WAL data. + + + + + + Int32 + + + + The log file number of the LSN, indicating the starting point of + the WAL in the message. + + + + + + Int32 + + + + The byte offset of the LSN, indicating the starting point of + the WAL in the message. + + + + + + Byten + + + + Data that forms part of WAL data stream. + + + + + + + + A single WAL record is never split across two CopyData messages. When -- cgit v1.2.3