Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, MARK CALLAGHAN <mdcallag(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>
Subject: Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT
Date: 2026-09-15 15:56:55
Message-ID: CAH2-WzmQj_ktk9uFn_26YNqyLJHx2Lr+hXQOoQu3F34ETdi9WA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 24, 2026 at 4:48 AM Jakub Wartak
<jakub(dot)wartak(at)enterprisedb(dot)com> wrote:
> #define VISITED_PAGES_LIMIT 100
> +#define INDEX_PAGES_LIMIT 3
>
> So, is this based that proportion that we assume that everywhere on average
> 33 heap pages are going to be covered by 1 btree page? (just asking if we
> I get the assumption right, I don't have anything against it).

No, they're just 2 independent limits. I don't think that you can make
any useful assumptions about the average density of heap pages per
leaf page. There's too much workload diversity for that.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2026-09-15 16:01:17 Re: Problems with get_actual_variable_range's VISITED_PAGES_LIMIT
Previous Message Fujii Masao 2026-09-15 15:51:32 Re: Fix failing assert in deferred constraint trigger