Re: DOCS: Generated table columns are skipped by logical replication

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DOCS: Generated table columns are skipped by logical replication
Date: 2024-06-19 04:21:05
Message-ID: CAA4eK1+w1sg46Q3cV8WMcQFX12twES55=vLHHRqDDgBKuSLhLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 19, 2024 at 6:46 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Tue, Jun 18, 2024 at 9:40 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, Jun 18, 2024 at 12:11 PM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> > >
> > > While reviewing another thread that proposes to include "generated
> > > columns" support for logical replication [1] I was looking for any
> > > existing PostgreSQL documentation on this topic.
> > >
> > > But, I found almost nothing about it at all -- I only saw one aside
> > > mention saying that logical replication low-level message information
> > > is not sent for generated columns [2].
> > >
> > > ~~
> > >
> > > IMO there should be some high-level place in the docs where the
> > > behaviour for logical replication w.r.t. generated columns is
> > > described.
> > >
> >
> > +1.
> >
> > > There are lots of candidate places which could talk about this topic.
> > > * e.g.1 in "Generated Columns" (section 5.4)
> > > * e.g.2 in LR "Column-Lists" docs (section 29.5)
> > > * e.g.3 in LR "Restrictions" docs (section 29.7)
> > > * e.g.4 in the "CREATE PUBLICATION" reference page
> > >
> > > For now, I have provided just a simple patch for the "Generated
> > > Columns" section [3]. Perhaps it is enough.
> > >
> >
> > Can we try to clarify if their corresponding values are replicated?
> >
>
> Sure. Here are some current PG17 observed behaviours demonstrating
> that generated columns are not replicated.
>

Thanks for sharing examples. Your proposed patch as-is looks good to
me. We should back-patch this unless you or someone else thinks
otherwise.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-06-19 04:49:51 Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan
Previous Message Richard Guo 2024-06-19 04:15:24 Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan