public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Geoghegan <[email protected]>
To: Andres Freund <[email protected]>
Cc: Jakub Wartak <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: MARK CALLAGHAN <[email protected]>
Cc: Tomas Vondra <[email protected]>
Subject: Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT
Date: Tue, 23 Jun 2026 16:06:13 -0400
Message-ID: <CAH2-WzmugSOCGw-+mjocGRXBbwSevjMJ41dLaF0ukJzUGEKF=Q@mail.gmail.com> (raw)
In-Reply-To: <CAH2-WzkmWviX6fGwJ_a775WMQ5-Qvg_FPXg=5wA4DMDeScmURw@mail.gmail.com>
References: <CAH2-Wzkt1WkKp4VRJu3qHfmKXc8W+XYv1RXg5d2d3fSvAeO=rg@mail.gmail.com>
<CAKZiRmwjmGBWvPx6=qFRXJhm=sCrUyE7pPiPGA454LDdKemtQg@mail.gmail.com>
<CAH2-Wz=w_pQj80wi=Mf=S3V-SVbobFxqiNPSj-vFW2Hfpi4mdA@mail.gmail.com>
<4s3vd2rjll4vgnhdnajrqwsnhnmnmtmjtwjngfsrzmjx3nrxvp@la2vohpjojnk>
<CAH2-WzkmWviX6fGwJ_a775WMQ5-Qvg_FPXg=5wA4DMDeScmURw@mail.gmail.com>
On Thu, Mar 12, 2026 at 9:13 PM Peter Geoghegan <[email protected]> wrote:
> I'm trying to be practical here. I want to design a solution
> compatible with the changes that we're making to the table AM
> interface. That fixes Mark's complaint. Ideally, this should avoid
> adding much new code to hot code paths. Any design that meets those
> goals is acceptable to me.
The latest version of the index prefetching patch set has a new patch for this:
https://postgr.es/m/CAH2-WzkZTkDuyVFszLwPJesF9pS5E8m0UA+344bx-B-zfA5kaw@mail.gmail.com
My original proposal involved wholly replacing VISITED_PAGES_LIMIT; my
new approach complements it by specifically targeting its one major
weakness. A new INDEX_PAGES_LIMIT mechanism will only tally index leaf
page reads that return zero matching items to the table AM, and will
only give up when that count reaches 3. VISITED_PAGES_LIMIT itself
works as before.
Importantly, this allows VISITED_PAGES_LIMIT to work exactly the same
way on standbys as it does today. During hot standby, LP_DEAD bits
cannot be set or used to avoid heap fetches. As long as each leaf page
returns at least one match (which could still be a TID pointing to a
dead heap tuple), nothing changes -- INDEX_PAGES_LIMIT does nothing
new, we rely on VISITED_PAGES_LIMIT in the traditional way.
--
Peter Geoghegan
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT
In-Reply-To: <CAH2-WzmugSOCGw-+mjocGRXBbwSevjMJ41dLaF0ukJzUGEKF=Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox