Re: Damage control for planner's get_actual_variable_endpoint() runaway

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Damage control for planner's get_actual_variable_endpoint() runaway
Date: 2022-11-21 17:45:55
Message-ID: 3216784.1669052755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Nov 21, 2022 at 12:38 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> What it's restricting is the number of heap page fetches, which
>> might be good enough. We don't have a lot of visibility here
>> into how many index pages were scanned before returning the next
>> not-dead index entry, so I'm not sure how hard it'd be to do better.

> Oh. That's really sad. Because I think the whole problem here is that
> the number of dead index entries can be huge.

If they're *actually* dead, we have enough mitigations in place I think,
as explained by the long comment in get_actual_variable_endpoint.
The problem here is with still-visible-to-somebody tuples. At least,
Jakub's test case sets it up that way.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-11-21 17:52:01 Re: pgsql: Prevent instability in contrib/pageinspect's regression test.
Previous Message Robert Haas 2022-11-21 17:39:18 Re: Damage control for planner's get_actual_variable_endpoint() runaway