Re: [PATCH] Support automatic sequence replication
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Ajin Cherian <itsajin@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-13T11:40:23Z
Lists: pgsql-hackers
On Wed, Feb 11, 2026 at 9:21 AM shveta malik <shveta.malik@gmail.com> wrote: > > > Additionally, the existing ALTER SUBSCRIPTION … REFRESH SEQUENCES > > command should be enhanced so that it can be executed on disabled > > subscriptions and perform sequence synchronization independently, > > without relying on the sequence sync worker. Supporting execution on a > > disabled subscription is necessary because, if REFRESH SEQUENCES is > > run while the subscription is enabled, the apply worker may start > > immediately, ingest new transactions, and advance the replication > > slot's LSN beyond the point at which sequences were last synchronized > > again. > > > > Note: This approach may conservatively report that sequences need to > > be synchronized even when no sequence values have actually changed. > > This limitation is inherent to the design, as during an upgrade we > > don't connect to the publisher and decode WAL between the two LSNs to > > determine whether any sequence changes actually occurred. > > > > I like the idea. In particular, I like the approach of providing a > REFRESH SEQUENCE command to the user. Even if we don’t implement the > check during the upgrade process, we can clearly document that users > should verify sequence drift before upgrading. If any sequence drift > is detected, they should run REFRESH-SEQ manually. > Yeah, implementing such checks are not required in upgrade but it is better to document the use of this command in upgrade context. -- With Regards, Amit Kapila.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Don't include wait_event.h in pgstat.h
- 868825aaeb40 19 (unreleased) cited
-
Don't include proc.h in shm_mq.h
- a2c89835f512 19 (unreleased) cited
-
Fix unsafe RTE_GROUP removal in simplify_EXISTS_query
- 77c7a17a6e5f 19 (unreleased) cited
-
Add sequence synchronization for logical replication.
- 5509055d6956 19 (unreleased) cited