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

From Amit Kapila
Subject Re: [PATCH] Support automatic sequence replication
Date
Msg-id CAA4eK1JnsrE1eZkqBVBQu6z0WiXChwQ=CjJjJtWS6Wu3Ze=agQ@mail.gmail.com
Whole thread
In response to RE: [PATCH] Support automatic sequence replication  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
On Mon, Feb 23, 2026 at 6:56 AM Hayato Kuroda (Fujitsu)
<kuroda.hayato@fujitsu.com> wrote:
>
> 06.
> Not sure if the issue should be discussed here, but I found that sequences more
> likely to go backward if users use sequences on the subscriber side.
> Previously, the sync could happen based on the request, and users could understand
> the risk. But now everything would be done automatically, thus they may be
> surprised more.
>
> Should we consider some ratchet mechanisms, or retain it now because it's not
> expected usage?
>

We discussed this case upthread. We ideally can handle it via
conflict/resolution strategy or simply avoid updating the sequences
that are synced from the publisher. If we do later it would be tricky
because we need to maintain a persistent state and then after
failover, that state should be cleared. We discussed to have it
documented that users should use such sequences only during upgrade or
for failover cases, allowing to update it actively on multiple nodes
can lead to inconsistency.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Support automatic sequence replication
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: [PATCH] Support automatic sequence replication