Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, sk(at)zsrv(dot)org, david(at)nlpgo(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
Date: 2018-01-18 08:25:05
Message-ID: 20180118082505.GA84508@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Jan 18, 2018 at 12:57:38PM +0500, Andrey Borodin wrote:
>> 18 янв. 2018 г., в 10:48, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> написал(а):
>>
>> Gist imposes the ninth strategy to perform index only scan but
>> planner is not considering that
>> ....
>> Please find the attached patch.
> I agree with you that current behavior is a bug and your patch seems correct.
> I'm a bit worried about ninth strategy words: fetch is not necessary
>> now, if opclass lacks compress methods - index only scan is
>> possible. See
>> https://github.com/postgres/postgres/commit/d3a4f89d8a3e500bd7c0b7a8a8a5ce1b47859128
>> for details.
>
> Though there are tests in cube and seg for that, if your patch passes
> check-world, than this behavior is not affected.

The proposed patch has no regression tests. If the current set is not
enough to stress the problem, you surely should add some (haven't
checked the patch in detail, sorry ;p ).
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-01-18 10:20:09 Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
Previous Message Andrey Borodin 2018-01-18 07:57:38 Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2018-01-18 08:38:22 Re: [HACKERS] Surjective functional indexes
Previous Message Andrey Borodin 2018-01-18 08:18:12 Re: GSoC 2018