On Tue, Feb 24, 2026 at 4:55 PM Amit Kapila <[email protected]> wrote:
>
> On Tue, Feb 24, 2026 at 4:34 PM Ajin Cherian <[email protected]> wrote:
> >
> > Currently REFRESH SEQUENCES can only be called if the subscription is
> > enabled. All it does is change the states of all the sequences in
> > subscription_rel to INIT, this will prompt the sequence worker to wake
> > up and unconditionally sync all the sequences. For sequences in the
> > INIT state, it doesn't check if there is drift or not, it updates all
> > sequences unconditionally. From your discussions with Dilip, I
> > understand we want to reduce the time it takes to REFRESH SEQUENCES at
> > the time of an upgrade. If so, then this might not be a good approach.
> >
>
> The point I was trying to make is that with automatic sequence sync,
> we won't need to execute REFRESH SEQUENCES before upgrade or failover
> as the sequences will be in sync.
>

That is a valid goal, however, the sequence sync worker is an
asynchronous process triggered at specific intervals. For a switchover
to guarantee consistency, we must disconnect all connections from the
current publisher and wait for all pending data to sync. Relying on an
automated, interval-based worker at this critical time is risky, as it
directly extends our downtime. To minimize the cutover window, we
should either treat sequence data the same as relational data
(synchronous streaming) or manually trigger for the sequence sync
during the switchover phase, i.e. REFRESH SEQUENCES.  Anyway this is
my understanding, do you have anything else in mind that how you are
trying to completely avoid REFRESH SEQUENCES.  Having said that I
agree that in many cases where sequences are not frequently modified
it is very much possible that when we are in switchover phase all
sequences are already in sync and if we can identify that then we can
avoid REFRESH SEQUENCES, but my point is we can not completely avoid
that in all caes.  And the cases where we are frequently inserting
into relation which has a sequence type field the sequences will be
freqnectly modified and we have to call REFRESH SEQUENCES.

-- 
Regards,
Dilip Kumar
Google


Reply via email to