On Sat, Jul 31, 2021 at 2:30 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
>
> vignesh C <vignes...@gmail.com> writes:
> [ v6-0001-Included-the-actual-datatype-used-in-logical-repl.patch ]
>
> I see what you want to do here, but the way you did it seems quite
> detrimental to the readability of the field descriptions.
> Parenthesized interjections should be used sparingly.
>
> I'm inclined to think that the equivalent data type is part of the
> field data type specification, and thus that we ought to put it in
> the data type part of each entry.  So we'd have something like
>
> <varlistentry>
> <term>
>         Int64 (XLogRecPtr)
> </term>
> <listitem>
> <para>
>                 The final LSN of the transaction.
> </para>
> </listitem>
> </varlistentry>
>

I made changes based on the feedback, since Peter also was in favour
of using this approach, I modified based on the first approach.
Attached v7 patch has the changes for the same.

Regards,
Vignesh
From 285f4fe337222690f27f164d7210afbda84c37d0 Mon Sep 17 00:00:00 2001
From: Vigneshwaran c <vignes...@gmail.com>
Date: Sun, 1 Aug 2021 20:21:31 +0530
Subject: [PATCH v7] Included the actual datatype used in logical replication
 message format documentation.

Included the actual datatype used in logical replication message format
documentation.
---
 doc/src/sgml/protocol.sgml | 159 +++++++++++++++++++++++--------------
 1 file changed, 100 insertions(+), 59 deletions(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 9843953b05..ac53c82d19 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -6411,7 +6411,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>
@@ -6436,7 +6437,7 @@ Begin
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -6446,7 +6447,7 @@ Begin
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (TimestampTz)
 </term>
 <listitem>
 <para>
@@ -6457,7 +6458,7 @@ Begin
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6491,7 +6492,7 @@ Message
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6502,7 +6503,7 @@ Message
 </varlistentry>
 <varlistentry>
 <term>
-        Int8
+        Int8 (uint8)
 </term>
 <listitem>
 <para>
@@ -6513,7 +6514,7 @@ Message
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -6579,17 +6580,17 @@ Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int8
+        Int8(0) (uint8)
 </term>
 <listitem>
 <para>
-                Flags; currently unused (must be 0).
+                Flags; currently unused.
 </para>
 </listitem>
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -6599,7 +6600,7 @@ Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -6609,7 +6610,7 @@ Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (TimestampTz)
 </term>
 <listitem>
 <para>
@@ -6644,7 +6645,7 @@ Origin
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -6693,7 +6694,7 @@ Relation
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6704,7 +6705,7 @@ Relation
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -6760,7 +6761,7 @@ Relation
 <variablelist>
 <varlistentry>
 <term>
-        Int8
+        Int8 (uint8)
 </term>
 <listitem>
 <para>
@@ -6781,7 +6782,7 @@ Relation
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -6825,7 +6826,7 @@ Type
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6836,7 +6837,7 @@ Type
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -6890,7 +6891,7 @@ Insert
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6901,7 +6902,7 @@ Insert
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -6957,7 +6958,7 @@ Update
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -6968,7 +6969,7 @@ Update
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -7071,7 +7072,7 @@ Delete
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7082,7 +7083,7 @@ Delete
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -7160,7 +7161,7 @@ Truncate
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7192,7 +7193,7 @@ Truncate
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (Oid)
 </term>
 <listitem>
 <para>
@@ -7238,7 +7239,7 @@ Stream Start
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7307,7 +7308,7 @@ Stream Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7317,17 +7318,17 @@ Stream Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int8
+        Int8(0) (uint8)
 </term>
 <listitem>
 <para>
-                Flags; currently unused (must be 0).
+                Flags; currently unused.
 </para>
 </listitem>
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -7337,7 +7338,7 @@ Stream Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (XLogRecPtr)
 </term>
 <listitem>
 <para>
@@ -7347,7 +7348,7 @@ Stream Commit
 </varlistentry>
 <varlistentry>
 <term>
-        Int64
+        Int64 (TimestampTz)
 </term>
 <listitem>
 <para>
@@ -7382,7 +7383,7 @@ Stream Abort
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7392,7 +7393,7 @@ Stream Abort
 </varlistentry>
 <varlistentry>
 <term>
-        Int32
+        Int32 (TransactionId)
 </term>
 <listitem>
 <para>
@@ -7432,21 +7433,27 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The LSN of the prepare.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The end LSN of the prepared transaction.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (TimestampTz)
+</term>
 <listitem><para>
                 Prepare timestamp of the transaction. The value is in number
                 of microseconds since PostgreSQL epoch (2000-01-01).
@@ -7454,7 +7461,9 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int32</term>
+<term>
+        Int32 (TransactionId)
+</term>
 <listitem><para>
                 Xid of the transaction.
 </para></listitem>
@@ -7489,28 +7498,36 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int8</term>
+<term>
+        Int8(0) (uint8)
+</term>
 <listitem><para>
-                Flags; currently unused (must be 0).
+                Flags; currently unused.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The LSN of the prepare.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The end LSN of the prepared transaction.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (TimestampTz)
+</term>
 <listitem><para>
                 Prepare timestamp of the transaction. The value is in number
                 of microseconds since PostgreSQL epoch (2000-01-01).
@@ -7518,7 +7535,9 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int32</term>
+<term>
+        Int32 (TransactionId)
+</term>
 <listitem><para>
                 Xid of the transaction.
 </para></listitem>
@@ -7553,28 +7572,36 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int8</term>
+<term>
+        Int8(0) (uint8)
+</term>
 <listitem><para>
-                Flags; currently unused (must be 0).
+                Flags; currently unused.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The LSN of the commit prepared.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The end LSN of the commit prepared transaction.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (TimestampTz)
+</term>
 <listitem><para>
                 Commit timestamp of the transaction. The value is in number
                 of microseconds since PostgreSQL epoch (2000-01-01).
@@ -7582,7 +7609,9 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int32</term>
+<term>
+        Int32 (TransactionId)
+</term>
 <listitem><para>
                 Xid of the transaction.
 </para></listitem>
@@ -7617,28 +7646,36 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int8</term>
+<term>
+        Int8(0) (uint8)
+</term>
 <listitem><para>
-                Flags; currently unused (must be 0).
+                Flags; currently unused.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The end LSN of the prepared transaction.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (XLogRecPtr)
+</term>
 <listitem><para>
                 The end LSN of the rollback prepared transaction.
 </para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (TimestampTz)
+</term>
 <listitem><para>
                 Prepare timestamp of the transaction. The value is in number
                 of microseconds since PostgreSQL epoch (2000-01-01).
@@ -7646,7 +7683,9 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int64</term>
+<term>
+        Int64 (TimestampTz)
+</term>
 <listitem><para>
                 Rollback timestamp of the transaction. The value is in number
                 of microseconds since PostgreSQL epoch (2000-01-01).
@@ -7654,7 +7693,9 @@ are available since protocol version 3.
 </varlistentry>
 
 <varlistentry>
-<term>Int32</term>
+<term>
+        Int32 (TransactionId)
+</term>
 <listitem><para>
                 Xid of the transaction.
 </para></listitem>
-- 
2.30.2

Reply via email to