-
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
- 6 commits
- 50 files changed
- 2 contributors
Commits on Apr 28, 2025
-
Introduce pg_sequence_state function for enhanced sequence management
This patch introduces a new function, 'pg_sequence_state', which allows retrieval of sequence values, including the associated LSN.
Configuration menu - View commit details
-
Copy full SHA for 72d6b83 - Browse repository at this point
Copy the full SHA 72d6b83View 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.
Configuration menu - View commit details
-
Copy full SHA for 5b0ca81 - Browse repository at this point
Copy the full SHA 5b0ca81View 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.
Configuration menu - View commit details
-
Copy full SHA for 19ac78c - Browse repository at this point
Copy the full SHA 19ac78cView commit details -
Enhance 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 - (PG18 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 - (PG18 command syntax is unchanged) - Drop 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 - Drop 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.
Configuration menu - View commit details
-
Copy full SHA for 1aabaf5 - Browse repository at this point
Copy the full SHA 1aabaf5View commit details -
Documentation for sequence synchronization feature.
Documentation for sequence synchronization feature.
Configuration menu - View commit details
-
Copy full SHA for fd43dc8 - Browse repository at this point
Copy the full SHA fd43dc8View commit details -
[CF 5111] v20250428 - 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/CALDaNm00Gf-EGFpr__7dioEgotkDm1e75RicRQ-hqCdj_5Yjpw@mail.gmail.com Author(s): vigneshwaran C
Commitfest Bot committedApr 28, 2025 Configuration menu - View commit details
-
Copy full SHA for f55d037 - Browse repository at this point
Copy the full SHA f55d037View 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