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

Commits on Dec 6, 2025

  1. pg_resetwal: Reject negative and out of range arguments

    The strtoul() function that we used to parse many of the options
    accepts negative values, and silently wraps them to the equivalent
    unsigned values. For example, -1 becomes 0xFFFFFFFF, on platforms
    where unsigned long is 32 bits wide. Also, on platforms where
    "unsigned long" is 64 bits wide, we silently casted values larger than
    UINT32_MAX to the equivalent 32-bit value. Both of those behaviors
    seem undesireable, so tighten up the parsing to reject negative and
    too large values.
    hlinnaka authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    72c1154 View commit details
    Browse the repository at this point in the history
  2. pg_resetwal: Use separate flags for whether an option is given

    Currently, we use special values that are otherwise invalid for each
    option to indicate "option was not given". Replace that with separate
    boolean variables for each option. It seems more clear to be explicit.
    
    We were already doing that for the -m option, because there were no
    invalid values for nextMulti that we could use (since commit
    94939c5).
    hlinnaka authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    0454908 View commit details
    Browse the repository at this point in the history
  3. Move pg_multixact SLRU page format definitions to a separate header

    This makes them accessible from pg_upgrade, needed by the next commit.
    I'm doing this mechanical move as a separate commit to make the next
    commit's changes to these definitions more obvious.
    
    Author: Maxim Orlov <orlovmg@gmail.com>
    Discussion: https://www.postgresql.org/message-id/CACG%3DezbZo_3_fnx%3DS5BfepwRftzrpJ%2B7WET4EkTU6wnjDTsnjg@mail.gmail.com
    hlinnaka authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    6ae8032 View commit details
    Browse the repository at this point in the history
  4. FIXME: bump catversion

    To avoid constant CF-bot complains, make catversion bump in a separate
    commit.
    
    This is to be squashed with the main commit before pushing.
    
    NOTE: keep it in sync with MULTIXACTOFFSET_FORMATCHANGE_CAT_VER
    Maxim Orlov authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    9d4263b View commit details
    Browse the repository at this point in the history
  5. Widen MultiXactOffset to 64 bits

    This eliminates offset wraparound and the 2^32 limit on the total
    number of multixid members. Multixids are still limited to 2^31, but
    this is a nice improvement because 'members' can grow much faster than
    the number of multixids. On such systems, you can now run longer
    before hitting hard limits or triggering anti-wraparound vacuums.
    
    Not having to deal with offset wraparound also simplifies the code and
    removes some gnarly corner cases.
    
    We no longer need to perform emergency anti-wraparound freezing
    because of running out of 'members' space, so the offset stop limit is
    gone. But you might still not want 'members' to consume huge amounts
    of disk space. For that reason, I kept the logic for lowering vacuum's
    multixid freezing cutoff if a large amount of 'members' space is
    used. The thresholds for that are roughly the same as the "safe" and
    "danger" thresholds used before, 2 billion transactions and 4 billion
    transactions. This keeps the behavior for the freeze cutoff roughly
    the same as before . It might make sense to make this smarter or
    configurable, now that the threshold is only needed to manage disk
    usage, but that's left for the future.
    
    Add code to pg_upgrade to convert multitransactions from the old to
    the new format. Because pg_upgrade now rewrites the files in the new
    format, we can get rid of some hacks we had put in place to deal with
    old bugs and upgraded clusters.
    
    Author: Maxim Orlov <orlovmg@gmail.com>
    Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
    Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
    Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com>
    Discussion: https://www.postgresql.org/message-id/CACG%3DezaWg7_nt-8ey4aKv2w9LcuLthHknwCawmBgEeTnJrJTcw@mail.gmail.com
    hlinnaka authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    b27b65f View commit details
    Browse the repository at this point in the history
  6. Add runtime checks for bogus multixact offsets

    These are not directly related to 64 bit offsets, but makes sense I
    think
    hlinnaka authored and Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    c6a9191 View commit details
    Browse the repository at this point in the history
  7. [CF 5205] v28 - Make MultiXactOffset 64-bit type

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5205
    
    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/2c62322e-a0e3-49cd-b369-370718a8efd8@iki.fi
    Author(s): Maxim Orlov
    Commitfest Bot committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    8ed64fe View commit details
    Browse the repository at this point in the history
Loading