Re: Corrected documentation of data type for the logical replication message formats.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Corrected documentation of data type for the logical replication message formats.
Date: 2021-05-10 13:45:56
Message-ID: CALDaNm2G_BJ9G=Cxy9A6ht-TXPn4nB8W9_BcawuA1uxsNvoWfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 9, 2021 at 6:54 PM Euler Taveira <euler(at)eulerto(dot)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

Attachment Content-Type Size
v2-0001-Corrected-data-type-for-the-logical-replication-m.patch application/x-patch 5.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-05-10 13:51:52 Re: Corrected documentation of data type for the logical replication message formats.
Previous Message Dilip Kumar 2021-05-10 13:44:54 Re: Remove "FROM" in "DELETE FROM" when using tab-completion