Re: Ambiguous description on new columns

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: "kdg(dot)dev(at)gmail(dot)com" <kdg(dot)dev(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Ambiguous description on new columns
Date: 2024-05-22 04:31:07
Message-ID: CAKFQuwZY4x2PA0kqfD_WAsnMe4O69G45wOtbrGjWNVHybBMiRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Tuesday, May 21, 2024, Peter Smith <smithpb2250(at)gmail(dot)com> wrote:

>
> >
> > Each publication can optionally specify which columns of each table are
> replicated to subscribers. The table on the subscriber side must have at
> least all the columns that are published. If no column list is specified,
> then all columns on the publisher[, present and future,] are replicated.
> See CREATE PUBLICATION for details on the syntax.
> >
> > ...security...
> >
> > ...delete the entire "ambiguous" paragraph...
> >
>
> Your suggested text doesn't seem quite as explicit about that subtle
> point, but I guess since you can still infer the same meaning it is
> fine.

Right, it doesn’t seem that subtle so long as we point out what an absent
column list means. if you specify a column list you get exactly what you
asked for. It’s like listing columns in select. But if you don’t specify
a column list you get whatever is there at runtime. Which I presume also
means dropped columns no longer get replicated, but I haven’t tested and
the docs don’t seem to cover column removal…

In contrast, if we don’t say this, one might reasonably assume that it
behaves like:
Create view vw select * from tbl;
when it doesn’t.

So yes, I do think saying “present and future” sufficiently covers the
intent of the removed paragraph and clearly ties that to the table columns
in response to this complaint.

>
> But, maybe say "all columns on the published table" instead of "all
> columns on the publisher".
>

Agreed.

David J.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2024-05-22 05:12:36 Re: column_name of ALTER MATERIALIZED VIEW should only refer to an existing column
Previous Message Peter Smith 2024-05-22 04:12:48 Re: Ambiguous description on new columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2024-05-22 07:21:10 Re: Ambiguous description on new columns
Previous Message Ajin Cherian 2024-05-22 04:17:54 Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding