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/5613~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/5613
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Apr 4, 2025

  1. Improve nbtree skip scan primitive scan scheduling.

    Don't allow nbtree scans with skip arrays to end any primitive scan on
    its first leaf page without giving some consideration to how many times
    the scan's arrays advanced while changing at least one skip array
    (though continue not caring about the number of array advancements that
    only affected SAOP arrays, even during skip scans with SAOP arrays).
    Now when a scan performs more than 3 such array advancements in the
    course of reading a single leaf page, it is taken as a signal that the
    next page is unlikely to be skippable.  We'll therefore continue the
    ongoing primitive index scan, at least until we can perform a recheck
    against the next page's finaltup.
    
    Testing has shown that this new heuristic occasionally makes all the
    difference with skip scans that were expected to rely on the "passed
    first page" heuristic added by commit 9a2e2a2.  Without it, there is a
    remaining risk that certain kinds of skip scans will never quite manage
    to clear the initial hurdle of performing a primitive scan that lasts
    beyond its first leaf page (or that such a skip scan will only clear
    that initial hurdle when it has already wasted noticeably-many cycles
    due to inefficient primitive scan scheduling).
    
    Follow-up to commits 92fe23d and 9a2e2a2.
    
    Author: Peter Geoghegan <[email protected]>
    Reviewed-By: Matthias van de Meent <[email protected]>
    Discussion: https://postgr.es/m/CAH2-Wz=RVdG3zWytFWBsyW7fWH7zveFvTHed5JKEsuTT0RCO_A@mail.gmail.com
    petergeoghegan committed Apr 4, 2025
    Configuration menu
    Copy the full SHA
    21a152b View commit details
    Browse the repository at this point in the history
Loading