-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5111~1
head repository: postgresql-cfbot/postgresql
compare: cf/5111
- 7 commits
- 55 files changed
- 2 contributors
Commits on Aug 9, 2025
-
Enhance pg_get_sequence_data function
This patch enhances 'pg_get_sequence_data' to return the sequence’s log_cnt and associated page LSN. In the subsequent patches, When a sequence is synchronized to the subscriber, the page LSN of the sequence from the publisher is also captured and stored in pg_subscription_rel.srsublsn. This LSN will reflect the state of the sequence at the time of synchronization. By comparing the current LSN of the sequence on the publisher (via pg_sequence_state()) with the stored LSN on the subscriber, users can detect if the sequence has advanced and is now out-of-sync. This comparison will help determine whether re-synchronization is needed for a given sequence. Author: Vignesh C, Tomas Vondra Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for c2bf2f2 - Browse repository at this point
Copy the full SHA c2bf2f2View commit details -
Introduce "ALL SEQUENCES" support for PostgreSQL logical replication
This commit enhances logical replication by enabling the inclusion of all sequences in publications. Furthermore, enhancements to psql commands now display which publications contain the specified sequence (\d command), and if a specified publication includes all sequences (\dRp command). Note: This patch currently supports only the "ALL SEQUENCES" clause. Handling of clauses such as "FOR SEQUENCE" and "FOR SEQUENCES IN SCHEMA" will be addressed in a subsequent patch. "ALL SEQUENCES" can be combined with "ALL TABLES" (e.g., 'FOR ALL SEQUENCES, ALL TABLES') in a 'FOR ALL' publication. It cannot be combined with other options such as TABLE or TABLES IN SCHEMA. Author: Vignesh C, Tomas Vondra Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 5524b09 - Browse repository at this point
Copy the full SHA 5524b09View commit details -
Reorganize tablesync Code and Introduce syncutils
Reorganized the tablesync code by creating a new syncutils file. This refactoring will facilitate the development of sequence synchronization worker code. This commit separates code reorganization from functional changes, making it clearer to reviewers that only existing code has been moved. The changes in this patch can be merged with subsequent patches during the commit process. Author: Vignesh C Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 44b4323 - Browse repository at this point
Copy the full SHA 44b4323View commit details -
Introduce "REFRESH PUBLICATION SEQUENCES" for subscriptions
This patch adds support for a new SQL command: ALTER SUBSCRIPTION ... REFRESH PUBLICATION SEQUENCES This command synchronizes the set of sequences associated with a subscription based on the sequences currently present in the publication on the publisher. It also marks the corresponding entries in the pg_subscription_rel catalog table with the INIT state to trigger resynchronization. Additionally, the following subscription commands: ALTER SUBSCRIPTION ... REFRESH PUBLICATION ALTER SUBSCRIPTION ... ADD PUBLICATION ALTER SUBSCRIPTION ... DROP PUBLICATION ALTER SUBSCRIPTION ... SET PUBLICATION have been extended to also refresh sequence mappings. These commands will: Add newly published sequences that are not yet part of the subscription. Remove sequences that are no longer included in the publication. This ensures that sequence replication remains aligned with the current state of the publication on the publisher side, improving consistency and reducing manual maintenance. Author: Vignesh C, Tomas Vondra Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 8fe2199 - Browse repository at this point
Copy the full SHA 8fe2199View commit details -
New worker for sequence synchronization during subscription management
This patch introduces sequence synchronization: Sequences have 2 states: - INIT (needs synchronizing) - READY (is already synchronized) A new sequencesync worker is launched as needed to synchronize sequences. It does the following: a) Retrieves remote values of sequences with pg_sequence_state() INIT. b) Logs a warning if the sequence parameters differ between the publisher and subscriber. c) Sets the local sequence values accordingly. d) Updates the local sequence state to READY. e) Repeats until all done; Commits synchronized sequences in batches of 100 Sequence synchronization occurs in 3 places: 1) CREATE SUBSCRIPTION - (PG19 command syntax is unchanged) - The subscriber retrieves sequences associated with publications. - Published sequences are added to pg_subscription_rel with INIT state. - Initiate the sequencesync worker (see above) to synchronize all sequences. 2) ALTER SUBSCRIPTION ... REFRESH PUBLICATION - (PG19 command syntax is unchanged) - Dropped published sequences are removed from pg_subscription_rel. - Newly published sequences are added to pg_subscription_rel with INIT state. - Initiate the sequencesync worker (see above) to synchronize only newly added sequences. 3) ALTER SUBSCRIPTION ... REFRESH PUBLICATION SEQUENCES - The patch introduces this new command to refresh all sequences - Dropped published sequences are removed from pg_subscription_rel. - Newly published sequences are added to pg_subscription_rel - All sequences in pg_subscription_rel are reset to INIT state. - Initiate the sequencesync worker (see above) to synchronize all sequences. Author: Vignesh C Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for a548709 - Browse repository at this point
Copy the full SHA a548709View commit details -
Documentation for sequence synchronization feature.
Documentation for sequence synchronization feature. Author: Vignesh C Reviewer: Amit Kapila, Shveta Malik, Dilip Kumar, Peter Smith, Nisha Moond Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 8546a8b - Browse repository at this point
Copy the full SHA 8546a8bView commit details -
[CF 5111] v20250806 - Synchronization of sequences to subscriber
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5111 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CALDaNm05eFK4vB6pihNHVoob9412eQjzCeuP5vVK1EutAZ+B+Q@mail.gmail.com Author(s): vigneshwaran C
Commitfest Bot committedAug 9, 2025 Configuration menu - View commit details
-
Copy full SHA for c842d55 - Browse repository at this point
Copy the full SHA c842d55View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5111~1...cf/5111