Re: Pgoutput not capturing the generated columns

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Shubham Khanna <khannashubham1197(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Rajendra Kumar Dangwal <dangwalrajendra888(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, euler(at)eulerto(dot)com
Subject: Re: Pgoutput not capturing the generated columns
Date: 2024-11-04 05:26:22
Message-ID: CAA4eK1J+PhsL12F9voB1igOedsKhC=kPCMiNsiEty8ZvPY5C1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 4, 2024 at 10:30 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Mon, Nov 4, 2024 at 12:28 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> Thanks for the latest doc v2 "fix" patch. Here are my review comments about it.
>
> ======
> src/sgml/logical-replication.sgml
>
> 1.
> During initial data synchronization, only the published columns are
> copied. However, if the subscriber is from a release prior to 15, then
> all the columns in the table are copied during initial data synchronization,
> - ignoring any column lists.
> + ignoring any column lists. If the subscriber is from a release prior to 18,
> + then initial table synchronization won't copy generated columns data even if
> + they are defined in the publisher.
>
> There are some inconsistencies with the markup etc.
>
> a) For publication row filters the text about Initial Synchronization
> version differences is using SGML <Note> markup. But, for "Column
> Lists" the similar text about Initial Synchronization version
> differences is just plain paragraph text. So, shouldn't this also be
> using a <Note> markup for better documentation consistency?
>

I don't think both are comparable as the row filters section has a
separate sub-section for Initial Data Synchronization. In general, I
find the way things are described in the Column Lists sub-section more
like other parts of the documentation. Moreover, this patch has just
extended the existing docs.

> b) I also thought "even if they are defined in the publisher" wording
> seems like it is referring about the table definition, but IMO it
> needs to convey something more like "even when they are published"
>
> SUGGESTION
> If the subscriber is from a release prior to 18, copy pre-existing
> data does not copy generated columns even when they are published.
> This is because old releases ignore generated table data during the
> copy.
>

The second line says something obvious and doesn't seem to be
required. The change "even when they are published" is debatable as I
didn't read the way you read Vignesh's proposed wording, to me it was
clear what the doc is saying. I have already pushed Vignesh's version
with a minor modification.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-11-04 05:46:39 Re: general purpose array_sort
Previous Message jian he 2024-11-04 05:00:00 Re: [PoC] Federated Authn/z with OAUTHBEARER