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 May 5, 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 May 5, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    Ayesh Ayesh Karunaratne
    Copy the full SHA
    903a205 View commit details
  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 May 5, 2025
    Copy the full SHA
    25806a4 View commit details
  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 May 5, 2025
    Copy the full SHA
    a6b0f41 View commit details
  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 May 5, 2025
    Copy the full SHA
    2255153 View commit details
  5. Documentation for sequence synchronization feature.

    Documentation for sequence synchronization feature.
    vigneshwaran-c authored and Commitfest Bot committed May 5, 2025
    Copy the full SHA
    34aab85 View commit details
  6. [CF 5111] v20250503 - 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/CALDaNm184jrhLLYFdzTbjFbgttkVeEEGx4UERoApJH_PZFDCFQ@mail.gmail.com
    Author(s): vigneshwaran C
    Commitfest Bot committed May 5, 2025
    Copy the full SHA
    d18a5f2 View commit details
Loading