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

Commits on Nov 4, 2025

  1. Handle WAL timeline switches with incomplete records

    When switching timelines with incomplete WAL records at the end of the
    old timeline, physical replicas could enter an infinite recovery loop by
    repeatedly requesting the same WAL data. This occurs because the
    incomplete record isn't properly marked with XLOG_OVERWRITE_CONTRECORD
    record, causing replicas to retry fetching it.
    
    To fix this, we preserve WAL's append-only nature by writing an
    XLOG_OVERWRITE_CONTRECORD to explicitly mark incomplete records before
    initializing the new timeline. This ensures replicas can properly detect
    transition to the new timeline without getting stuck.
    DLaaren authored and Commitfest Bot committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    f01a803 View commit details
    Browse the repository at this point in the history
  2. Removed assertion in walsummarizer

    Fixes an edge case in the walsummarizer process where fetching InsertTLI
    during a timeline switch could lead to latest_lsn < read_upto (which
    becomes walrcv->flushedUpto in this case), previously triggering an
    assertion failure. We now handle this safely by replacing the assertion
    with conditional logic.
    DLaaren authored and Commitfest Bot committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    8746aa1 View commit details
    Browse the repository at this point in the history
  3. Handle rewind failure when a timeline ends with an overwritten contre…

    …cord.
    
    When a common timeline ends with an overwritten contrecord, the
    divergence point may not point to the start of a valid WAL record on the
    target, causing errors and making rewind impossible.
    
    To handle this case, when the target timeline is unfinished, we look for
    a checkpoint preceding the divergence point starting from the last
    checkpoint on the target rather than from the divergence point itself.
    This ensures we always begin from a known-valid position in WAL.
    DLaaren authored and Commitfest Bot committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    b5d44f2 View commit details
    Browse the repository at this point in the history
  4. [CF 6038] v3 - Timeline switching with partial WAL records can break …

    …replica recovery
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6038
    
    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/CAGWv16JqHWZRnWUcTTEMF=0f+zqpboU4t+eKMANeTJObecYPXA@mail.gmail.com
    Author(s): Alyona Vinter
    Commitfest Bot committed Nov 4, 2025
    Configuration menu
    Copy the full SHA
    499ad21 View commit details
    Browse the repository at this point in the history
Loading