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

Commits on Aug 9, 2025

  1. Eliminate the freelist from the buffer manager and depend on clock-sweep

    This set of changes removes the list of available buffers and instead
    simply uses the clock-sweep algorithm to find and return an available
    buffer.  While on the surface this appears to be removing an
    optimization it is in fact eliminating code that induces overhead in the
    form of synchronization that is problemmatic for multi-core systems.
    This also removes the have_free_buffer() function and simply caps the
    pg_autoprewarm process to at most NBuffers.
    gburd authored and Commitfest Bot committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    8c6bc80 View commit details
    Browse the repository at this point in the history
  2. Remove the buffer_strategy_lock and make the clock hand a 64 bit atomic

    Change nextVictimBuffer to an atomic uint64 and simply atomically
    increment it by 1 at each tick.  The next victim buffer is the the value
    of nextVictimBuffer modulo the number of buffers (NBuffers).  The number
    of complete passes of the clock-sweep hand is nextVictimBuffer divided
    by NBuffers. Wrap-around of nextVictimBuffer would require 10 years at
    ~59 billion ticks per-second without restart, so unlikely that we ignore
    that case entirely.
    
    With the removal of the freelist and completePasses none of remaining
    items in the BufferStrategyControl structure require strict coordination
    and so it is possible to eliminate the buffer_strategy_lock as well.
    gburd authored and Commitfest Bot committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    70807dc View commit details
    Browse the repository at this point in the history
  3. Abstract clock-sweep buffer replacement algorithm

    Re-author the clock-sweep algorithm such that it maintains its own state
    and has a well defined API.
    gburd authored and Commitfest Bot committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    0dd55e7 View commit details
    Browse the repository at this point in the history
  4. [CF 5928] v11 - Remove freelist and the buffer_strategy_lock

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5928
    
    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/[email protected]
    Author(s): Greg Burd
    Commitfest Bot committed Aug 9, 2025
    Configuration menu
    Copy the full SHA
    a32e77c View commit details
    Browse the repository at this point in the history
Loading