RE: [PATCH] Support automatic sequence replication
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, Ajin Cherian <itsajin@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-13T07:13:48Z
Lists: pgsql-hackers
Attachments
- v12-0003-Synchronize-sequences-directly-in-REFRESH-SEQUEN.patch (application/octet-stream) patch v12-0003
- v12-0001-Support-automatic-sequence-replication.patch (application/octet-stream) patch v12-0001
- v12-0002-Cache-sequence-information-in-the-sequence-sync-.patch (application/octet-stream) patch v12-0002
On Monday, March 9, 2026 11:13 AM shveta malik <shveta.malik@gmail.com> wrote: > > No major concerns on 001, just a few trivial things. Do these only if you feel > okay about these. > Thanks for the reviews. I've updated the patch set addressing all comments. In 0001, aside from addressing comments in [1][2][3][4], I've changed the logic to delay updating the page LSN for each sequence in pg_subscription_rel. Frequent catalog updates would generate many invalidations, degrading the performance of the apply worker which relies on cached data from pg_subscription_rel. 0002 adds caching of sequence information for the current subscription in the sequence sync worker. The cache is invalidated immediately when pg_subscription_rel is modified. Concurrent changes to sequence names or namespaces are detected before synchronization, as the worker verifies the sequence data at sync time. 0003 (formerly 0002) modifies REFRESH SEQUENCES to synchronize sequence values directly without launching a worker. [1] https://www.postgresql.org/message-id/02EDB3D2-4E5A-4EDE-BADF-3DF62D707831%40gmail.com [2] https://www.postgresql.org/message-id/OS9PR01MB12149E4614DA95963670772EEF579A%40OS9PR01MB12149.jpnprd01.prod.outlook.com [3] https://www.postgresql.org/message-id/CAJpy0uAmEkjsBS6RxPv9iDcK2kfJ5%3Dbq4Mq1zMCQtaYFoDfbbQ%40mail.gmail.com [4] https://www.postgresql.org/message-id/CAJpy0uC0T_tp62zxJN_2d_A%3DYpvf14ebjGFepckeJugW5OHOyA%40mail.gmail.com Best Regards, Hou zj
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