On Sun, May 9, 2021 at 6:54 PM Euler Taveira <eu...@eulerto.com> wrote: > > On Sun, May 9, 2021, at 9:37 AM, vignesh C wrote: > > For some of the logical replication messages the data type documented > was not correct, especially for lsn and xid. For lsn actual datatype > used is uint64 but is documented as int64, similarly for xid, datatype > used is uint32 but documented as int32. > Attached is a patch which has the fix for the same. > Thoughts? > > There was a discussion [1] a few months ago about it. Read the Message Data > Types definition [2]. It is confusing that an internal data type (int64) has a > name similar to a generic data type in a protocol definition. As I said [1] we > should probably inform that that piece of information (LSN) is a XLogRecPtr. > Since this chapter is intended for developers, I think it is fine to include > such internal detail.
I agree to specifying the actual dataypes like XLogRecPtr for lsn, TimestampTz for timestamp, TransactionId for xid and Oid for the object id. Attached v2 patch which is changed on similar lines. Thoughts? Regards, Vignesh
From e82378313f955699375f15f539a5267eb756b313 Mon Sep 17 00:00:00 2001 From: vignesh <vignesh21@gmail.com> Date: Sun, 9 May 2021 17:57:08 +0530 Subject: [PATCH v2] Corrected data type for the logical replication message formats. Corrected data type for the logical replication message formats. --- doc/src/sgml/protocol.sgml | 74 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 2f4dde3beb..bfc29a25f5 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -6403,7 +6403,7 @@ Begin </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -6413,7 +6413,7 @@ Begin </varlistentry> <varlistentry> <term> - Int64 + TimestampTz </term> <listitem> <para> @@ -6424,7 +6424,7 @@ Begin </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6458,7 +6458,7 @@ Message </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6469,7 +6469,7 @@ Message </varlistentry> <varlistentry> <term> - Int8 + Uint8 </term> <listitem> <para> @@ -6480,7 +6480,7 @@ Message </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -6534,7 +6534,7 @@ Commit </varlistentry> <varlistentry> <term> - Int8 + Uint8(0) </term> <listitem> <para> @@ -6544,7 +6544,7 @@ Commit </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -6554,7 +6554,7 @@ Commit </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -6564,7 +6564,7 @@ Commit </varlistentry> <varlistentry> <term> - Int64 + TimestampTz </term> <listitem> <para> @@ -6599,7 +6599,7 @@ Origin </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -6648,7 +6648,7 @@ Relation </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6659,7 +6659,7 @@ Relation </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -6702,7 +6702,7 @@ Relation <varlistentry> <term> - Int16 + Uint16 </term> <listitem> <para> @@ -6715,7 +6715,7 @@ Relation <variablelist> <varlistentry> <term> - Int8 + Uint8 </term> <listitem> <para> @@ -6736,7 +6736,7 @@ Relation </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -6780,7 +6780,7 @@ Type </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6791,7 +6791,7 @@ Type </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -6845,7 +6845,7 @@ Insert </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6856,7 +6856,7 @@ Insert </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -6912,7 +6912,7 @@ Update </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -6923,7 +6923,7 @@ Update </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -7026,7 +7026,7 @@ Delete </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7037,7 +7037,7 @@ Delete </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -7115,7 +7115,7 @@ Truncate </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7136,7 +7136,7 @@ Truncate </varlistentry> <varlistentry> <term> - Int8 + Uint8 </term> <listitem> <para> @@ -7147,7 +7147,7 @@ Truncate </varlistentry> <varlistentry> <term> - Int32 + Oid </term> <listitem> <para> @@ -7193,7 +7193,7 @@ Stream Start </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7203,7 +7203,7 @@ Stream Start </varlistentry> <varlistentry> <term> - Int8 + Uint8 </term> <listitem> <para> @@ -7262,7 +7262,7 @@ Stream Commit </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7272,7 +7272,7 @@ Stream Commit </varlistentry> <varlistentry> <term> - Int8 + Uint8(0) </term> <listitem> <para> @@ -7282,7 +7282,7 @@ Stream Commit </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -7292,7 +7292,7 @@ Stream Commit </varlistentry> <varlistentry> <term> - Int64 + XLogRecPtr </term> <listitem> <para> @@ -7302,7 +7302,7 @@ Stream Commit </varlistentry> <varlistentry> <term> - Int64 + TimestampTz </term> <listitem> <para> @@ -7337,7 +7337,7 @@ Stream Abort </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7347,7 +7347,7 @@ Stream Abort </varlistentry> <varlistentry> <term> - Int32 + TransactionId </term> <listitem> <para> @@ -7382,7 +7382,7 @@ TupleData <variablelist> <varlistentry> <term> - Int16 + Uint16 </term> <listitem> <para> -- 2.25.1