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
  • 4 commits
  • 31 files changed
  • 2 contributors

Commits on Oct 30, 2025

  1. New worker for sequence synchronization during subscription management

    This patch introduces sequence synchronization:
    Sequences have 2 states:
       - INIT (needs [re]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
        - (The command syntax remains unchanged from PG18 to PG19.)
        - 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
        - (The command syntax remains unchanged from PG18 to PG19.)
        - 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 SEQUENCES
        - (A new command introduced in PG19 by a prior patch.)
        - All sequences in pg_subscription_rel are reset to DATASYNC state.
        - Initiate the sequencesync worker (see above) to synchronize all
          sequences.
        - Unlike "ALTER SUBSCRIPTION ... REFRESH PUBLICATION" command,
          addition and removal of missing sequences will not be done in this
          case
    
    Author: Vignesh C <[email protected]>
    Reviewed-by: Amit Kapila <[email protected]>
    Reviewed-by: shveta malik <[email protected]>
    Reviewed-by: Hou Zhijie <[email protected]>
    Reviewed-by: Masahiko Sawada <[email protected]>
    Reviewed-by: Hayato Kuroda <[email protected]>
    Reviewed-by: Dilip Kumar <[email protected]>
    Reviewed-by: Peter Smith <[email protected]>
    Reviewed-by: Nisha Moond <[email protected]>
    Reviewed-by: Shlok Kyal <[email protected]>
    Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
    vigneshwaran-c authored and Commitfest Bot committed Oct 30, 2025
    Configuration menu
    Copy the full SHA
    55f04ad View commit details
    Browse the repository at this point in the history
  2. Documentation for sequence synchronization feature.

    Documentation for sequence synchronization feature.
    
    Author: Vignesh C <[email protected]>
    Reviewed-by: Amit Kapila <[email protected]>
    Reviewed-by: shveta malik <[email protected]>
    Reviewed-by: Hou Zhijie <[email protected]>
    Reviewed-by: Masahiko Sawada <[email protected]>
    Reviewed-by: Hayato Kuroda <[email protected]>
    Reviewed-by: Dilip Kumar <[email protected]>
    Reviewed-by: Peter Smith <[email protected]>
    Reviewed-by: Nisha Moond <[email protected]>
    Reviewed-by: Shlok Kyal <[email protected]>
    Discussion: https://www.postgresql.org/message-id/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.co
    vigneshwaran-c authored and Commitfest Bot committed Oct 30, 2025
    Configuration menu
    Copy the full SHA
    b433bc0 View commit details
    Browse the repository at this point in the history
  3. Add seq_sync_error_count to subscription statistics.

    This commit introduces a new column seq_sync_error_count to subscription
    statistics. The new field tracks the number of errors encountered during
    sequence synchronization for each subscription.
    vigneshwaran-c authored and Commitfest Bot committed Oct 30, 2025
    Configuration menu
    Copy the full SHA
    cc3ac5a View commit details
    Browse the repository at this point in the history
  4. [CF 5111] v20251030 - 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/CALDaNm3HTiMB549A_or_gLctioD+AzXejbBYQN4bRidt3Y3=8Q@mail.gmail.com
    Author(s): vigneshwaran C
    Commitfest Bot committed Oct 30, 2025
    Configuration menu
    Copy the full SHA
    b188658 View commit details
    Browse the repository at this point in the history
Loading