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/5837~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/5837
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 22, 2025

  1. Fix duplicate insert during pg_createsubscriber

    When pg_createsubscriber is run, the standby node is recovered to a
    point 'consistent_lsn' and promoted. Then, when the subscription is
    created, the replication origin is advanced to the 'consistent_lsn'.
    Then the subscription is enabled and the apply worker starts to send
    changes from 'consistent_lsn'.
    
    When this 'consistent_lsn' is an LSN corresponding to a COMMIT, the
    records for the transaction for that COMMIT are already replicated to
    the standby node during the recovery phase. Now, when the subscription
    is created, the replication origin is advanced and the subscription is
    enabled. The apply worker starts to apply changes from 'consistent_lsn'.
    So, records corresponding to the transaction whose COMMIT LSN is
    'consistent_lsn' are replicated again.
    
    To avoid this, set recovery_target_inclusive = false instead of true.
    So the standby will recovery till point just before 'consistent_lsn'.
    And apply worker will start(after enabling of subscription) to apply
    changes from 'consistent_lsn'. So, above scenorio is avoided.
    skkyal authored and Commitfest Bot committed Jul 22, 2025
    Configuration menu
    Copy the full SHA
    b674a07 View commit details
    Browse the repository at this point in the history
  2. [CF 5837] Logical replication conflict after using pg_createsubscribe…

    …r under heavy load
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5837
    
    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/CANhcyEVqFCNhrbkCJwOpT1Su5-D3s+kSsOoc-4edKc7rzbRfeA@mail.gmail.com
    Author(s): Shlok Kyal
    Commitfest Bot committed Jul 22, 2025
    Configuration menu
    Copy the full SHA
    61f9c96 View commit details
    Browse the repository at this point in the history
Loading