From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: DOCS - create publication (tweak for generated columns) |
Date: | 2025-04-28 09:51:37 |
Message-ID: | CAA4eK1LBBscH_9VsjmpbKN7cp_9EM91L1kBXa68yfddpz4HStQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Apr 28, 2025 at 8:08 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> On Wed, Apr 23, 2025 at 10:33 AM David G. Johnston
> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> ...
> > In the column list I would stick to mentioning what cannot be specified, since it would be assumed by default that any column on the table is fair game. I believe that means not mentioning stored generated and instead mentioning virtual generated. It really seems odds mentioning stored generated being allowed before mentioning when they are optional, default excluded.
> >
> > Alternative:
> >
> > The optional column list may include any non-virtual columns of the table. If omitted, tables publish all (including future) non-generated columns by default, and may publish stored generated columns if the publication option publish_generated_columns is set to stored. See Section 29.5 for details about column lists.
> >
> >
> > I don’t get why truncate is mentioned here. I omitted it intentionally.
> >
>
> Hi David,
>
> Thanks for your feedback/suggestions. Sorry for my late reply -- I was
> waiting for any other feedback, but none was forthcoming, so here is
> my patch v2.
>
> I've rearranged the text and mentioned non-virtual and non-generated
> as suggested.
>
> I also did not really understand why TRUNCATE is mentioned in this
> paragraph, but I have left that as-is for now.
>
I think TRUNCATE is mentioned because column_list has an impact on all
other DML commands like insert, update, delete that gets replicated
except Truncate. So, leaving Truncate as it is seems okay to me.
- The column list can contain stored generated columns as well. If no
- column list is specified, all table columns (except generated columns)
- are replicated through this publication, including any columns added
- later. It has no effect on <literal>TRUNCATE</literal> commands. See
+ The column list may include any non-virtual columns of the table. If the
+ column list is omitted, the publication will replicate all non-generated
+ columns (including any added in the future) by default. Stored generated
+ columns can also be replicated if
<literal>publish_generated_columns</literal>
+ is set to <literal>stored</literal>.
I find the use of non-virtual in the first line and non-generated in
the second line a bit confusing. Can we keep the first line as it is
(The column list can contain stored generated columns as well.)?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Nisha Moond | 2025-04-28 11:03:02 | Re: Fix slot synchronization with two_phase decoding enabled |
Previous Message | shveta malik | 2025-04-28 09:33:05 | Re: Fix slot synchronization with two_phase decoding enabled |