On Wed, May 12, 2021 at 3:36 AM Peter Smith <smithpb2...@gmail.com> wrote: > > On Wed, May 12, 2021 at 1:02 AM vignesh C <vignes...@gmail.com> wrote: > > > > Thanks for the comments, Attached v3 patch has the changes as suggested. > > This v3 mostly looks good to me now except for some minor comments > about the flags. > > ~~~ > > 1. Commit flags > > @@ -6534,11 +6536,11 @@ Commit > </varlistentry> > <varlistentry> > <term> > - Int8 > + Uint8(0) > </term> > <listitem> > <para> > - Flags; currently unused (must be 0). > + Flags (uint8(0)); currently unused (must be 0). > </para> > </listitem> > </varlistentry> > > a) There is no data type Uint8. That should be "Int8(0)" >
Modified. > b) I think the "(0)" does not belong in the description part. > e.g. change to "Flags (uint8); currently unused (must be 0)." > Modified > ~~~ > > 2. Stream Commit flags > > @@ -7276,7 +7284,7 @@ Stream Commit > </term> > <listitem> > <para> > - Flags; currently unused (must be 0). > + Flags (uint8(0)); currently unused (must be 0). > </para> > </listitem> > </varlistentry> > > a) The data type should say "Int8(0)" > Modified. > b) I think the "(0)" does not belong in the description part. > e.g. change to "Flags (uint8); currently unused (must be 0)." > Modified. > ~~~ > > 3. I felt that saying "(must be 0)" for those unused flag descriptions > is unnecessary since that is exactly what "Int8(0)" already means. > e.g. consider change to just say "Flags (uint8); currently unused." Modified. Thanks for the comments. Attached v4 patch has the fix for the same. Regards, Vignesh
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