From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #18644: ALTER PUBLICATION ... SET (publish_via_partition_root) wrong/undocumented behavior. |
Date: | 2024-10-25 04:38:45 |
Message-ID: | CAHut+PsJ=x+RJYhiGSfXH1xG8yv8ky1vZyD_AsZLcotpwUuycg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Oct 25, 2024 at 2:26 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Fri, Oct 25, 2024 at 6:12 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
> >
> > Hi Kuroda-san,
> >
> > This is only a caution for ALTER of 'publish_via_partition_root', so
> > that should be immediately clear up-front in the first few words of
> > the text.
> >
> > Also, the current explanation appears to give more details about how
> > and why it happens than I felt was necessary. e.g. this is for user
> > documentation, not for a code comment. Basically, I'm wondering if the
> > whole thing could be "dumbed down" a little bit, keeping only the
> > information essential so the users can protect themselves. Maybe
> > something a bit more like below?
> >
> > SUGGESTION
> > <caution>
> > <para>
> > Altering the <literal>publish_via_partition_root</literal> parameter
> > can lead to data loss or duplication at the subscriber because it
> > changes the identity and schema of the published tables.
> > </para>
>
> This appears precise but lacks the key information that the problem
> can happen when a partitioned root table is specified as a replication
> target. So, how about one of the following:
>
> * Altering the <literal>publish_via_partition_root</literal> parameter
> when the partition root table is specified as the replication target
> can lead to data loss or duplication at the subscriber because it
> changes the identity and schema of the published tables.
>
> * Altering the <literal>publish_via_partition_root</literal> parameter
> can lead to data loss or duplication at the subscriber because it
> changes the identity and schema of the published tables. Note this
> happens only when the partition root table is specified as the
> replication target.
+1 for the second one. (but maybe say "a partition root table" instead
of "the partition root table")
>
> > <para>
> > This problem can be avoided by refraining from modifying
> > partition leaf tables
> > after the <command>ALTER PUBLICATION ... SET</command> until the
> > <link linkend="sql-altersubscription"><command>ALTER
> > SUBSCRIPTION ... REFRESH PUBLICATION</command></link>
> > is executed, and by only refreshing using the <literal>copy_data
> > = off</literal> option.
> > </para>
> > </caution>
> >
>
> We can keep this part as you proposed.
>
> --
> With Regards,
> Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Павел Некрасов | 2024-10-25 06:23:17 | Re: BUG #18614: [ECPG] out of bound in DecodeDateTime |
Previous Message | Amit Kapila | 2024-10-25 03:26:34 | Re: BUG #18644: ALTER PUBLICATION ... SET (publish_via_partition_root) wrong/undocumented behavior. |