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: michael(dot)paquier(at)gmail(dot)com
Cc: x4mmm(at)yandex-team(dot)ru, 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 12:14:49
Message-ID: 20180118.211449.240575561.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hello.

At Thu, 18 Jan 2018 17:25:05 +0900, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote in <20180118082505(dot)GA84508(at)paquier(dot)xyz>
> On Thu, Jan 18, 2018 at 12:57:38PM +0500, Andrey Borodin wrote:
> >> 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 ).

Uggg.. I'm beaten again.. You're definitely right!

It was a bit hard to find the way to cause the failure without
extension but the first attached file is that.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Regression-test-for-the-failure-of-check_index_only.patch text/x-patch 4.1 KB
0002-Fix-check_index_only-for-the-case-of-duplicate-keyco.patch text/x-patch 2.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2018-01-18 13:03:46 BUG #15014: pg_trgm regexp with wchar not good?
Previous Message Michael Paquier 2018-01-18 11:58:27 Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-01-18 12:16:41 Re: [HACKERS] [PATCH] Improve geometric types
Previous Message Michael Paquier 2018-01-18 11:58:27 Re: [HACKERS] [BUGS] Bug in Physical Replication Slots (at least 9.5)?