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>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Hou, Zhijie/侯 志杰 <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Subject: | Re: Logical Replication of sequences |
Date: | 2024-08-08 09:27:20 |
Message-ID: | CAA4eK1LewSrEBD5BCy6Vpqb827WxN3cviXFxWjy8--=EYjgKYQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Aug 8, 2024 at 11:09 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> But, I haven't invented a new overloading for "copy_data" option
> (meaning "synchronize") for sequences. The current patchset already
> interprets copy_data exactly this way.
>
> For example, below are patch 0003 results:
>
> ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION WITH (copy_data=false)
> - this will add/remove new sequences in pg_subscription_rel, but it
> will *not* synchronize the new sequence
>
> ALTER SUBSCRIPTION sub1 REFRESH PUBLICATION WITH (copy_data=true)
> - this will add/remove new sequences in pg_subscription_rel, and it
> *will* synchronize the new sequence
>
> ~
>
> I only proposed that copy_data should apply to *all* sequences, not
> just new ones.
>
I don't like this difference because for tables, it would *not*
consider syncing already the existing tables whereas for sequences it
would consider syncing existing ones. We previously discussed adding a
new option like copy_all_sequences instead of adding a new variant of
command but that has its own set of problems, so we agreed to proceed
with a new variant. See [1] ( ...Good point. And I understood that the
REFRESH PUBLICATION SEQUENCES command would be helpful when users want
to synchronize sequences between two nodes before upgrading.).
Having said that, if others also prefer to use copy_data for this
purpose with a different meaning of this option w.r.t tables and
sequences then we can still consider it.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2024-08-08 09:37:54 | Re: Incremental View Maintenance, take 2 |
Previous Message | Hayato Kuroda (Fujitsu) | 2024-08-08 09:07:00 | RE: Found issues related with logical replication and 2PC |