Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on
Date
Msg-id CAAKRu_bx6xdx6AY9cWuEUzWbyuvJ+JY=OfvTPTLpxxg_aoaqUw@mail.gmail.com
Whole thread Raw
In response to Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on
List pgsql-hackers
On Mon, Oct 21, 2024 at 9:32 PM David Rowley <dgrowleyml@gmail.com> wrote:
>
> There's nothing new about Index Only Scans being disabled by
> enable_indexscan. Index Only Scan is chosen with your test case as all
> possible Paths are disabled and IOS is the cheapest of all Paths.

Ah, I see! Sorry, I didn't think to compare and see what the cheapest
path would be if all paths were disabled and, of course, planner still
needs to pick one. Thanks!

> Robert did propose to change this behaviour while he was working on
> the disabled_nodes changes. I did push back on the proposed change
> [1]. If you feel strongly that what we have is wrong, then maybe it's
> worth opening the discussion about that again.

I suppose if you think of index-only scan as a kind of subclass of
index scan, then disabling index scan should disable index-only scan.
However, it seems like there should be a way to force an index-only
scan even if it is not the cheapest path. Perhaps I only think this as
a developer needing to test something. But if enable_indexscan
disables index-only scan then I don't see how I can force an
index-only scan when it is not cheapest.

- Melanie



pgsql-hackers by date:

Previous
From: Daniil Davydov
Date:
Subject: Re: Do not lock temp relations
Next
From: Vik Fearing
Date:
Subject: Re: Row pattern recognition