Re: BUG #16303: A condtion whether an index-only scan is possible includes a wrong

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Horimoto Yasuhiro <horimoto(at)clear-code(dot)com>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16303: A condtion whether an index-only scan is possible includes a wrong
Date: 2020-03-16 06:35:53
Message-ID: CAKFQuwaJYP75bMkRZfFqJZaYLQULC_kkLB_nYc2Y3p3oUPOGQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sunday, March 15, 2020, Horimoto Yasuhiro <horimoto(at)clear-code(dot)com>
wrote:

> I send a patch for this problem.!
>
> From: PG Bug reporting form <noreply(at)postgresql(dot)org>
> Subject: BUG #16303: A condtion whether an index-only scan is possible
> includes a wrong
> Date: Mon, 16 Mar 2020 06:02:25 +0000
>
> > I think that the condition of whether an index-only scan is possible
> > includes a wrong.
> >
> > For example, in the following case, the index has no data to return.
> Because
> > the query doesn't use specify columns.
> > However, the query planner choice index-only scan.
>
>

> > In my opinion, we expected that the query planner doesn't choose an
> > index-only scan in the above case.
> >
>
>
I don't see a behavioral bug here. I would expect that any index would be
an acceptable match for a query whose set of return columns is the empty
set. The empty set is a subset of all sets.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Horimoto Yasuhiro 2020-03-16 08:22:30 Re: BUG #16303: A condtion whether an index-only scan is possible includes a wrong
Previous Message Horimoto Yasuhiro 2020-03-16 06:05:33 Re: BUG #16303: A condtion whether an index-only scan is possible includes a wrong