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

Commits on Apr 29, 2025

  1. IOS/TableAM: Support AM-specific fast visibility tests

    Previously, we assumed VM_ALL_VISIBLE is universal across all AMs. This
    is probably not the case, so we introduce a new table method called
    "table_index_vischeck_tuples" which allows anyone to ask the AM whether
    a tuple is definitely visible to everyone or might be invisible to
    someone.
    
    The API is intended to replace direct calls to VM_ALL_VISIBLE and as such
    doesn't include "definitely dead to everyone", as the Heap AM's VM doesn't
    support *definitely dead* as output for its lookups; and thus it would be
    too expensive for the Heap AM to produce such results.
    
    A future commit will use this inside GIST and SP-GIST to fix a race
    condition between IOS and VACUUM, which causes a bug with tuple
    visibility, and a further patch will add support for this to nbtree.
    MMeent authored and Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    c0d88cb View commit details
    Browse the repository at this point in the history
  2. GIST: Fix visibility issues in IOS

    Previously, GIST IOS could buffer tuples from pages while VACUUM came
    along and cleaned up an ALL_DEAD tuple, marking the tuple's page
    ALL_VISIBLE again and making IOS mistakenly believe the tuple is indeed
    visible.
    
    With this patch, pins now conflict with GIST vacuum, and we now do
    preliminary visibility checks to be used by IOS so that the IOS
    infrastructure knows to recheck the heap page even if that page is now
    ALL_VISIBLE.
    
    Idea from Heikki Linnakangas
    MMeent authored and Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    ddf2fb9 View commit details
    Browse the repository at this point in the history
  3. SP-GIST: Fix visibility issues in IOS

    Previously, SP-GIST IOS could buffer tuples from pages while VACUUM came
    along and cleaned up an ALL_DEAD tuple, marking the tuple's page
    ALL_VISIBLE again and making IOS mistakenly believe the tuple is indeed
    visible.
    
    With this patch, pins now conflict with SP-GIST vacuum, and we now do
    preliminary visibility checks to be used by IOS so that the IOS
    infrastructure knows to recheck the heap page even if that page is now
    ALL_VISIBLE.
    
    Idea from Heikki Linnakangas
    MMeent authored and Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    1f58d71 View commit details
    Browse the repository at this point in the history
  4. NBTree: Reduce Index-Only Scan pin duration

    Previously, we would keep a pin on every leaf page while we were returning
    tuples to the scan.  With this patch, we utilize the newly introduced
    table_index_vischeck_tuples API to pre-check visibility of all TIDs, and
    thus unpin the page well ahead of when we'd usually be ready with returning
    and processing all index tuple results.  This reduces the time VACUUM may
    have to wait for a pin, and can increase performance with reduced redundant
    VM checks.
    MMeent authored and Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    f73c779 View commit details
    Browse the repository at this point in the history
  5. Test for IOS/Vacuum race conditions in index AMs

    Add regression tests that demonstrate wrong results can occur with index-only
    scans in GiST and SP-GiST indexes when encountering tuples being removed by a
    concurrent VACUUM operation.
    
    With these tests the index AMs are also expected to not block VACUUM even when
    they're used inside a cursor.
    
    Co-authored-by: Matthias van de Meent <[email protected]>
    Co-authored-by: Peter Geoghegan <[email protected]>
    Co-authored-by: Michail Nikolaev <[email protected]>
    Discussion: https://www.postgresql.org/message-id/flat/CANtu0oi0rkR%2BFsgyLXnGZ-uW2950-urApAWLhy-%2BV1WJD%3D_ZXA%40mail.gmail.com
    3 people authored and Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    2dbb1de View commit details
    Browse the repository at this point in the history
  6. [CF 5542] v12 - Fix buffer pinning logic in [SP-]Gist

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5542
    
    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/CAEze2WgnHJF66BtviDFNCPy26gLrb+tfns-Bi62DBfReH0-UCg@mail.gmail.com
    Author(s): Peter Geoghegan, Michail Nikolaev, Matthias van de Meent
    Commitfest Bot committed Apr 29, 2025
    Configuration menu
    Copy the full SHA
    5219847 View commit details
    Browse the repository at this point in the history
Loading