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/6041~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/6041
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 12, 2025

  1. pg_rewind: ignore shutdown-only WAL when determining end-of-WAL

    Previously, pg_rewind determined the end-of-WAL on the target by using
    the last shutdown checkpoint (or minRecoveryPoint for a standby). This
    caused false positives in scenarios where the old primary was shut down
    after a failover: the only WAL record generated was a shutdown checkpoint,
    while the new primary and old primary still contained identical data.
    
    In such cases, pg_rewind incorrectly concluded that
        if (target_wal_endrec > divergerec) rewind_needed = true;
    and performed a rewind even though no real changes existed after the
    divergence point.
    
    With this patch, pg_rewind now scans backward from the last checkpoint
    to locate the most recent valid WAL record that is not a shutdown
    checkpoint or XLOG switch. As a result, a rewind is only required when
    the target contains actual changes past the divergence point, avoiding
    unnecessary rewind operations in clean failover scenarios.
    srinathv2 authored and Commitfest Bot committed Sep 12, 2025
    Configuration menu
    Copy the full SHA
    493c475 View commit details
    Browse the repository at this point in the history
  2. [CF 6041] v1 - Fix pg_rewind false positives caused by shutdown-only WAL

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6041
    
    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/CAFC+b6rsM+WUoph-aPk5sz4cPzaQ4XkRDNwCJ5nG5+HsRQ=j8A@mail.gmail.com
    Author(s): Srinath Reddy
    Commitfest Bot committed Sep 12, 2025
    Configuration menu
    Copy the full SHA
    6c6ad59 View commit details
    Browse the repository at this point in the history
Loading