Re: Logical Replication of sequences - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Logical Replication of sequences
Date
Msg-id CAFiTN-u-PU-c1SGayzNnpJWz3HoF+rh5yJE33CNkiSGW4iXScg@mail.gmail.com
Whole thread Raw
In response to Re: Logical Replication of sequences  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Thu, Oct 9, 2025 at 12:30 PM Peter Smith <smithpb2250@gmail.com> wrote:
>
> I think the "ALTER SUBSCRIPTION sub REFRESH PUBLICATION" command has
> the word PUBLICATION in it because it's the PUBLICATION has changed
> (stuff added/removed), so we need to refresh it.
>
> OTOH, the synchronisation of *existing* sequences is different - this
> is more like the subscription saying "Just get me updated values for
> the sequences I already know about". Therefore, I don't think the word
> PUBLICATION is relevant here.
>
> ~~
>
> So my suggestion is very different.  Just this:
> "ALTER SUBSCRIPTION sub REFRESH SEQUENCES"
>
> I feel this is entirely consistent, because:
>
> PUBLICATION objects have changed. Refresh me the new objects => ALTER
> SUBSCRIPTION sub REFRESH PUBLICATION;
>
> SEQUENCE values have changed. Refresh me the new values => ALTER
> SUBSCRIPTION sub REFRESH SEQUENCES;

I prefer this suggestion over the previous proposal so +1 from my side.

--
Regards,
Dilip Kumar
Google



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Reorganize GUC structs
Next
From: Michael Paquier
Date:
Subject: Re: Replace O_EXCL with O_TRUNC for creation of state.tmp in SaveSlotToPath