Re: [PATCH] Support automatic sequence replication - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [PATCH] Support automatic sequence replication
Date
Msg-id CAFiTN-tFanrK2S=ALc++vmOnS07mumSLA91aaYejBHi7X8+rUg@mail.gmail.com
Whole thread
In response to [PATCH] Support automatic sequence replication  (Ajin Cherian <itsajin@gmail.com>)
Responses Re: [PATCH] Support automatic sequence replication
List pgsql-hackers
On Tue, Feb 3, 2026 at 9:18 AM Ajin Cherian <itsajin@gmail.com> wrote:
>
> Hello hackers,
>
> I'd like to propose an improvement to the sequence replication feature
> that was committed in [1].
>
> The current implementation synchronizes sequences during initial
> subscription setup, but the sequence sync worker exits after this
> initial sync. This means that as sequences advance on the publisher,
> they drift from the subscriber values over time. Users must manually
> run ALTER SUBSCRIPTION ... REFRESH SEQUENCES to resynchronize, which
> requires monitoring and intervention.

Thanks, Ajin, for the proposal. I am trying to think: what is the use
case for automatically updating the sequence values? IIUC, the only
use case for the sequence sync worker was when using logical
replication for an upgrade; after the upgrade, you should have
up-to-date values for the sequences. By adding an automatic update,
are you targeting any new use case?

If we are still targeting the same use case, I’d like to understand
how updating the value at specific intervals will improve the user
experience.

--
Regards,
Dilip Kumar
Google



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pgstat include expansion
Next
From: Dilip Kumar
Date:
Subject: Re: Skipping schema changes in publication