From d4c6205a3a6749173c608c2393e5cc60aef561a2 Mon Sep 17 00:00:00 2001 From: Ajin Cherian Date: Wed, 7 Apr 2021 03:19:19 -0400 Subject: [PATCH v1] Add missing documentation of streaming in-progress transactions. Updated documentation for new messages added for streaming in-progress transactions, as well as changes made to the existing messages. Also updated the protocl versions supported for logical replication. --- doc/src/sgml/protocol.sgml | 250 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 249 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 380be5f..2a93a6b 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -2797,7 +2797,7 @@ The commands accepted in replication mode are: - Protocol version. Currently only version 1 is + Protocol version. Currently versions 1 and 2 are supported. @@ -6647,6 +6647,16 @@ Relation + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + ID of the relation. @@ -6768,6 +6778,16 @@ Type + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + ID of the data type. @@ -6822,6 +6842,16 @@ Insert + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + ID of the relation corresponding to the ID in the relation message. @@ -6878,6 +6908,16 @@ Update + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + ID of the relation corresponding to the ID in the relation message. @@ -6981,6 +7021,16 @@ Delete + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + ID of the relation corresponding to the ID in the relation message. @@ -7059,6 +7109,16 @@ Truncate + Xid of the transaction (only present for streamed transactions). + + + + + + Int32 + + + Number of relations @@ -7091,6 +7151,194 @@ Truncate + + +Stream Start + + + + + + + + Byte1('S') + + + + Identifies the message as a stream start message. + + + + + + Int32 + + + + Transaction id. + + + + + + Int8 + + + + Flag to indicate if this is the first stream segment for this XID. + 1 if first segment, 0 if not. + + + + + + + + + + + +Stream Stop + + + + + + + + Byte1('E') + + + + Identifies the message as a stream stop message. + + + + + + + + + + + +Stream Commit + + + + + + + + Byte1('c') + + + + Identifies the message as a stream commit message. + + + + + + Int32 + + + + Transaction id. + + + + + + Int8 + + + + Flags; currently unused (must be 0). + + + + + + Int64 + + + + The LSN of the commit. + + + + + + Int64 + + + + The end LSN of the transaction. + + + + + + Int64 + + + + Commit timestamp of the transaction. The value is in number + of microseconds since PostgreSQL epoch (2000-01-01). + + + + + + + + + + + +Stream Abort + + + + + + + + Byte1('A') + + + + Identifies the message as a stream abort message. + + + + + + Int32 + + + + Transaction id. + + + + + + Int32 + + + + Sub-transaction id (will be same as transaction id for top-level transactions). + + + + + + + + + -- 1.8.3.1