RE: Logical Replication of sequences
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Doc: Add documentation for sequence synchronization.
- 55cefadde874 19 (unreleased) landed
-
Remove unused assignment in CREATE PUBLICATION grammar.
- bfb7419b0bbe 19 (unreleased) landed
-
Add seq_sync_error_count to subscription statistics.
- f6a4c498dcf6 19 (unreleased) landed
-
Fix few issues in commit 5509055d69.
- 5a4eba558aa7 19 (unreleased) landed
-
Add sequence synchronization for logical replication.
- 5509055d6956 19 (unreleased) landed
-
Add worker type argument to logical replication worker functions.
- 3e8e05596a02 19 (unreleased) landed
-
Introduce "REFRESH SEQUENCES" for subscriptions.
- f0b3573c3aac 19 (unreleased) landed
-
Refactor logical worker synchronization code into a separate file.
- 41c674d2e31e 19 (unreleased) landed
-
Standardize use of REFRESH PUBLICATION in code and messages.
- 2436b8c047ff 19 (unreleased) landed
-
Add "ALL SEQUENCES" support to publications.
- 96b378497346 19 (unreleased) landed
-
Expose sequence page LSN via pg_get_sequence_data.
- b93172ca59f4 19 (unreleased) landed
-
Resume conflict-relevant data retention automatically.
- 0d48d393d465 19 (unreleased) cited
-
Post-commit review fixes for 228c370868.
- 1f7e9ba3ac4e 19 (unreleased) cited
-
Generate GUC tables from .dat file
- 63599896545c 19 (unreleased) cited
Attachments
- v20251020-0003-Documentation-for-sequence-synchronization.patch (application/octet-stream) patch v20251020-0003
- v20251020-0001-Introduce-REFRESH-SEQUENCES-for-subscripti.patch (application/octet-stream) patch v20251020-0001
- v20251020-0002-New-worker-for-sequence-synchronization-du.patch (application/octet-stream) patch v20251020-0002
On Friday, October 17, 2025 4:50 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Oct 16, 2025 at 4:53 PM Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
> wrote:
> >
> > Thanks! Here is the remaining patches, which addressed all pending
> comments.
> >
>
> Few comments on 0001/0003:
Thanks for the comments.
> ========================
> 1.
> @@ -480,7 +480,9 @@ RemoveSubscriptionRel(Oid subid, Oid relid)
> * leave tablesync slots or origins in the system when the
> * corresponding table is dropped.
> */
> - if (!OidIsValid(subid) && subrel->srsubstate != SUBREL_STATE_READY)
> + if (!OidIsValid(subid) &&
> + get_rel_relkind(subrel->srrelid) != RELKIND_SEQUENCE &&
> + subrel->srsubstate != SUBREL_STATE_READY)
> {
>
> Here, why don't we allow sequence rel to be removed? Please add some
> comments.
I think the intention is to allow removing sequence because we do not
create slot/origin when syncing sequence. I added some comments
for the same.
Other comments have been addressed in latest version.
Here is the latest patch set which addressed Shveta[1], Amit[2], Chao[3][4],
Dilip[5], Sawada-San's[6] comments.
Some of the code refactoring comments in [4] will be considered in
next versions.
[1] https://www.postgresql.org/message-id/CAJpy0uC898ga%2BQo3X%3Dk_MaRUL7EnmXt%2BppDJo-nroQZifrk5Hw%40mail.gmail.com
[2] https://www.postgresql.org/message-id/CAA4eK1K6Aofz_f6afuL%2Br2M3GfHBEYQ6-5JO93ph9xZAmYugSA%40mail.gmail.com
[3] https://www.postgresql.org/message-id/B0F583F9-6D4D-4C0F-9F35-64D5AB2F1643%40gmail.com
[4] https://www.postgresql.org/message-id/598FC353-8E9A-4857-A125-740BE24DCBEB%40gmail.com
[5] https://www.postgresql.org/message-id/CAFiTN-sC4yE_u7fa%2BUQS38JvhxN_VYSWTq2O_2bTRxxq%3DeW8FQ%40mail.gmail.com
[6] https://www.postgresql.org/message-id/CAD21AoBYP1a4%2B%2BALRPG%3DSmCoyGeGCcqhFxWSXYhy1cvmN0i3CA%40mail.gmail.com
Best Regards,
Hou zj