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: sk(at)zsrv(dot)org
Cc: michael(dot)paquier(at)gmail(dot)com, x4mmm(at)yandex-team(dot)ru, 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-24 07:11:53
Message-ID: 20180124.161153.214591193.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Thank you for looking this.

At Wed, 24 Jan 2018 00:13:51 +0300, Sergei Kornilov <sk(at)zsrv(dot)org> wrote in <348951516742031(at)web54j(dot)yandex(dot)ru>
> Hello
> I tested this patch and think it can be commited to master. Is there a CF record? I can not find one.

Not yet. I'm thinking of creating an entry in the next CF after
waiting someone to pickup this.

> Should we also make backport to older versions? I test on REL_10_STABLE - patch builds and works ok, but "make check" fails on new testcase with error:
> > CREATE INDEX ON t USING gist (a test_inet_ops, a inet_ops);
> >+ ERROR: missing support function 4 for attribute 1 of index "t_a_a1_idx"
> and with different explain results.

Thank you for checking that. d3a4f89 allowed that and
inet_gist_decompress is removed at the same time. Unfortunately I
didn't find a type on master that has both decompress and fetch
methods so I prefer to split the regression patch among target
versions.

master has its own one. 9.6 and 10 share the same patch. 9.5 has
a different one since the signature of consistent method has
changed as of 9.6. This is not required for 9.4 and earlier since
they don't check canreturn on attribute basis. (And they don't
try index-only on GiST.)

On the other hand the fix patch applies to all affected versions.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Regression-test-for-the-failure-of-check_index_only_95.patch text/x-patch 4.1 KB
0001-Regression-test-for-the-failure-of-check_index_only_10-96.patch text/x-patch 4.1 KB
0001-Regression-test-for-the-failure-of-check_index_only_master.patch text/x-patch 4.0 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 Patrik Uytterhoeven 2018-01-24 13:19:04 postgis package broken in postgresql 9.3 repo
Previous Message Andrey Borodin 2018-01-24 06:34:18 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 amul sul 2018-01-24 07:14:01 Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Previous Message Thomas Munro 2018-01-24 06:53:11 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)