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

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: x4mmm(at)yandex-team(dot)ru
Cc: 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 10:20:09
Message-ID: 20180118.192009.05328325.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

At Thu, 18 Jan 2018 12:57:38 +0500, Andrey Borodin <x4mmm(at)yandex-team(dot)ru> wrote in <62C2B9A0-51BC-40FF-9BCA-F203784CB9C1(at)yandex-team(dot)ru>
> Hello!
> > 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.

It is true. I don't think that fetch for trigm is feasible but it
is workable if created.

> Though there are tests in cube and seg for that, if your patch passes check-world, than this behavior is not affected.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-01-18 11:58:27 Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?
Previous Message Michael Paquier 2018-01-18 08:25:05 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 Fabien COELHO 2018-01-18 10:26:45 Re: [HACKERS] Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is (fwd)
Previous Message Simon Riggs 2018-01-18 10:08:53 Re: [HACKERS] Surjective functional indexes