From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Kevin Martin <martinkd@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: "Missing" column in Postgres logical replication update message
Date: Wed, 03 Aug 2022 11:28:24 -0400
Message-ID: <3043713.1659540504@sss.pgh.pa.us> (raw)
In-Reply-To: <6713b9c2-8a57-26a9-94e1-636e838b033a@aklaver.com>
References: <CAKYsA6U0KvvbF9Uq_eqXixaj7GB46cYB1b9VOfONSxmD6bMHMg@mail.gmail.com>
<b0c10140-5202-57aa-5a2b-844a14408795@aklaver.com>
<CAKYsA6V=aWTK+6AyiY0V9jkMJPY4B=dg=5V_D1Zj21tR8THisQ@mail.gmail.com>
<6713b9c2-8a57-26a9-94e1-636e838b033a@aklaver.com>
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> On 8/3/22 08:09, Kevin Martin wrote:
>> I thought that any UPDATE message in the replication logs is designed to
>> include all values for all columns. Is that correct?
Buried deep in the wire protocol specification is this bit:
----
The following message parts are shared by the above messages.
TupleData
Int16
Number of columns.
Next, one of the following submessages appears for each column (except generated columns):
...
Byte1('u')
Identifies unchanged TOASTed value (the actual value is not sent).
----
So that right there is two cases where we omit data for a column.
I suspect the "unchanged toasted data" case is what matters for
your purposes. Maybe you've found some code that fails to implement
that correctly?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, adrian.klaver@aklaver.com, martinkd@gmail.com
Subject: Re: "Missing" column in Postgres logical replication update message
In-Reply-To: <3043713.1659540504@sss.pgh.pa.us>
References: <CAKYsA6U0KvvbF9Uq_eqXixaj7GB46cYB1b9VOfONSxmD6bMHMg@mail.gmail.com> <b0c10140-5202-57aa-5a2b-844a14408795@aklaver.com> <CAKYsA6V=aWTK+6AyiY0V9jkMJPY4B=dg=5V_D1Zj21tR8THisQ@mail.gmail.com> <6713b9c2-8a57-26a9-94e1-636e838b033a@aklaver.com> <3043713.1659540504@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox