From b7efd44f0bbbf694fff7e97dea7cf6ca0271ca69 Mon Sep 17 00:00:00 2001
From: vignesh <vignesh21@gmail.com>
Date: Tue, 11 May 2021 20:29:43 +0530
Subject: [PATCH v4] Included the actual datatype used in logical replication
 message description.

Included the actual datatype used in logical replication message description.
---
 doc/src/sgml/protocol.sgml | 107 ++++++++++++++++++++-----------------
 1 file changed, 58 insertions(+), 49 deletions(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 2f4dde3beb..c05fd3af4c 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -6378,7 +6378,8 @@ This section describes the detailed format of each logical replication message.
 These messages are returned either by the replication slot SQL interface or are
 sent by a walsender. In case of a walsender they are encapsulated inside the replication
 protocol WAL messages as described in <xref linkend="protocol-replication"/>
-and generally obey same message flow as physical replication.
+and generally obey same message flow as physical replication. The base data types
+used are described in <xref linkend="protocol-message-types"/>.
 </para>
 
 <variablelist>
@@ -6407,7 +6408,7 @@ Begin
 </term>
 <listitem>
 <para>
-                The final LSN of the transaction.
+                The final LSN (XLogRecPtr) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -6417,8 +6418,8 @@ Begin
 </term>
 <listitem>
 <para>
-                Commit timestamp of the transaction. The value is in number
-                of microseconds since PostgreSQL epoch (2000-01-01).
+                Commit timestamp (TimestampTz) of the transaction. The value is
+                in number of microseconds since PostgreSQL epoch (2000-01-01).
 </para>
 </listitem>
 </varlistentry>
@@ -6428,7 +6429,7 @@ Begin
 </term>
 <listitem>
 <para>
-                Xid of the transaction.
+                Xid (TransactionId) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -6462,8 +6463,9 @@ Message
 </term>
 <listitem>
 <para>
-                Xid of the transaction (only present for streamed transactions).
-                This field is available since protocol version 2.
+                Xid (TransactionId) of the transaction (only present for
+                streamed transactions).  This field is available since protocol
+                version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -6473,8 +6475,8 @@ Message
 </term>
 <listitem>
 <para>
-                Flags; Either 0 for no flags or 1 if the logical decoding
-                message is transactional.
+                Flags (uint8); Either 0 for no flags or 1 if the logical
+                decoding message is transactional.
 </para>
 </listitem>
 </varlistentry>
@@ -6484,7 +6486,7 @@ Message
 </term>
 <listitem>
 <para>
-                The LSN of the logical decoding message.
+                The LSN (XLogRecPtr) of the logical decoding message.
 </para>
 </listitem>
 </varlistentry>
@@ -6534,11 +6536,11 @@ Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int8
+        Int8(0)
 </term>
 <listitem>
 <para>
-                Flags; currently unused (must be 0).
+                Flags (uint8); currently unused.
 </para>
 </listitem>
 </varlistentry>
@@ -6548,7 +6550,7 @@ Commit
 </term>
 <listitem>
 <para>
-                The LSN of the commit.
+                The LSN (XLogRecPtr) of the commit.
 </para>
 </listitem>
 </varlistentry>
@@ -6558,7 +6560,7 @@ Commit
 </term>
 <listitem>
 <para>
-                The end LSN of the transaction.
+                The end LSN (XLogRecPtr) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -6568,8 +6570,8 @@ Commit
 </term>
 <listitem>
 <para>
-                Commit timestamp of the transaction. The value is in number
-                of microseconds since PostgreSQL epoch (2000-01-01).
+                Commit timestamp (TimestampTz) of the transaction. The value is
+                in number of microseconds since PostgreSQL epoch (2000-01-01).
 </para>
 </listitem>
 </varlistentry>
@@ -6603,7 +6605,7 @@ Origin
 </term>
 <listitem>
 <para>
-                The LSN of the commit on the origin server.
+                The LSN (XLogRecPtr) of the commit on the origin server.
 </para>
 </listitem>
 </varlistentry>
@@ -6652,8 +6654,9 @@ Relation
 </term>
 <listitem>
 <para>
-               Xid of the transaction (only present for streamed transactions).
-               This field is available since protocol version 2.
+               Xid (TransactionId) of the transaction (only present for
+               streamed transactions).  This field is available since
+               protocol version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -6663,7 +6666,7 @@ Relation
 </term>
 <listitem>
 <para>
-                ID of the relation.
+                ID (Oid) of the relation.
 </para>
 </listitem>
 </varlistentry>
@@ -6719,8 +6722,8 @@ Relation
 </term>
 <listitem>
 <para>
-                Flags for the column. Currently can be either 0 for no flags
-                or 1 which marks the column as part of the key.
+                Flags (uint8) for the column. Currently can be either 0 for no
+                flags or 1 which marks the column as part of the key.
 </para>
 </listitem>
 </varlistentry>
@@ -6740,7 +6743,7 @@ Relation
 </term>
 <listitem>
 <para>
-                ID of the column's data type.
+                ID (Oid) of the column's data type.
 </para>
 </listitem>
 </varlistentry>
@@ -6784,8 +6787,9 @@ Type
 </term>
 <listitem>
 <para>
-               Xid of the transaction (only present for streamed transactions).
-               This field is available since protocol version 2.
+               Xid (TransactionId) of the transaction (only present for
+               streamed transactions).  This field is available since protocol
+               version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -6795,7 +6799,7 @@ Type
 </term>
 <listitem>
 <para>
-                ID of the data type.
+                ID (Oid) of the data type.
 </para>
 </listitem>
 </varlistentry>
@@ -6849,8 +6853,9 @@ Insert
 </term>
 <listitem>
 <para>
-                Xid of the transaction (only present for streamed transactions).
-                This field is available since protocol version 2.
+                Xid (TransactionId) of the transaction (only present for
+                streamed transactions).  This field is available since protocol
+                version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -6860,7 +6865,7 @@ Insert
 </term>
 <listitem>
 <para>
-                ID of the relation corresponding to the ID in the relation
+                ID (Oid) of the relation corresponding to the ID in the relation
                 message.
 </para>
 </listitem>
@@ -6916,8 +6921,9 @@ Update
 </term>
 <listitem>
 <para>
-               Xid of the transaction (only present for streamed transactions).
-               This field is available since protocol version 2.
+               Xid (TransactionId) of the transaction (only present for
+               streamed transactions).  This field is available since protocol
+               version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -6927,7 +6933,7 @@ Update
 </term>
 <listitem>
 <para>
-                ID of the relation corresponding to the ID in the relation
+                ID (Oid) of the relation corresponding to the ID in the relation
                 message.
 </para>
 </listitem>
@@ -7030,8 +7036,9 @@ Delete
 </term>
 <listitem>
 <para>
-               Xid of the transaction (only present for streamed transactions).
-               This field is available since protocol version 2.
+               Xid (TransactionId) of the transaction (only present for
+               streamed transactions).  This field is available since protocol
+               version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -7041,7 +7048,7 @@ Delete
 </term>
 <listitem>
 <para>
-                ID of the relation corresponding to the ID in the relation
+                ID (Oid) of the relation corresponding to the ID in the relation
                 message.
 </para>
 </listitem>
@@ -7119,8 +7126,9 @@ Truncate
 </term>
 <listitem>
 <para>
-               Xid of the transaction (only present for streamed transactions).
-               This field is available since protocol version 2.
+               Xid (TransactionId) of the transaction (only present for
+               streamed transactions).  This field is available since protocol
+               version 2.
 </para>
 </listitem>
 </varlistentry>
@@ -7151,7 +7159,7 @@ Truncate
 </term>
 <listitem>
 <para>
-                ID of the relation corresponding to the ID in the relation
+                ID (Oid) of the relation corresponding to the ID in the relation
                 message.  This field is repeated for each relation.
 </para>
 </listitem>
@@ -7197,7 +7205,7 @@ Stream Start
 </term>
 <listitem>
 <para>
-                Xid of the transaction.
+                Xid (TransactionId) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -7266,17 +7274,17 @@ Stream Commit
 </term>
 <listitem>
 <para>
-                Xid of the transaction.
+                Xid (TransactionId) of the transaction.
 </para>
 </listitem>
 </varlistentry>
 <varlistentry>
 <term>
-        Int8
+        Int8(0)
 </term>
 <listitem>
 <para>
-                Flags; currently unused (must be 0).
+                Flags (uint8); currently unused.
 </para>
 </listitem>
 </varlistentry>
@@ -7286,7 +7294,7 @@ Stream Commit
 </term>
 <listitem>
 <para>
-                The LSN of the commit.
+                The LSN (XLogRecPtr) of the commit.
 </para>
 </listitem>
 </varlistentry>
@@ -7296,7 +7304,7 @@ Stream Commit
 </term>
 <listitem>
 <para>
-                The end LSN of the transaction.
+                The end LSN (XLogRecPtr) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -7306,8 +7314,9 @@ Stream Commit
 </term>
 <listitem>
 <para>
-                Commit timestamp of the transaction. The value is in number
-                of microseconds since PostgreSQL epoch (2000-01-01).
+                Commit timestamp (TimestampTz) of the transaction. The value
+                is in number of microseconds since PostgreSQL epoch
+                (2000-01-01).
 </para>
 </listitem>
 </varlistentry>
@@ -7341,7 +7350,7 @@ Stream Abort
 </term>
 <listitem>
 <para>
-                Xid of the transaction.
+                Xid (TransactionId) of the transaction.
 </para>
 </listitem>
 </varlistentry>
@@ -7351,8 +7360,8 @@ Stream Abort
 </term>
 <listitem>
 <para>
-                Xid of the subtransaction (will be same as xid of the transaction for top-level
-                transactions).
+                Xid (TransactionId) of the subtransaction (will be same as xid
+                of the transaction for top-level transactions).
 </para>
 </listitem>
 </varlistentry>
-- 
2.25.1

