Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5111~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5111
Choose a head ref
  • 6 commits
  • 50 files changed
  • 2 contributors

Commits on Apr 28, 2025

  1. 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.
    vigneshwaran-c authored and Commitfest Bot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    72d6b83 View commit details
    Browse the repository at this point in the history
  2. 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.
    vigneshwaran-c authored and Commitfest Bot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    5b0ca81 View commit details
    Browse the repository at this point in the history
  3. 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.
    vigneshwaran-c authored and Commitfest Bot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    19ac78c View commit details
    Browse the repository at this point in the history
  4. 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.
    vigneshwaran-c authored and Commitfest Bot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    1aabaf5 View commit details
    Browse the repository at this point in the history
  5. Documentation for sequence synchronization feature.

    Documentation for sequence synchronization feature.
    vigneshwaran-c authored and Commitfest Bot committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    fd43dc8 View commit details
    Browse the repository at this point in the history
  6. [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 committed Apr 28, 2025
    Configuration menu
    Copy the full SHA
    f55d037 View commit details
    Browse the repository at this point in the history
Loading