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

2018-10-15 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Thu, 01 Mar 2018 15:39:18 -0500, Tom Lane wrote in > <22609.1519936...@sss.pgh.pa.us> >> ... After some poking >> around I found that the bug could be exhibited using just btree_gist's >> gist_inet_ops, since the core inet_ops class indexes the same datatype and >

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

2018-03-06 Thread Kyotaro HORIGUCHI
At Thu, 01 Mar 2018 15:39:18 -0500, Tom Lane wrote in <22609.1519936...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > At Wed, 24 Jan 2018 00:13:51 +0300, Sergei Kornilov wrote > > in <348951516742...@web54j.yandex.ru> > >> Should we also make backport to older versions? I test on REL_10_STABL

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

2018-03-01 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Wed, 24 Jan 2018 00:13:51 +0300, Sergei Kornilov wrote in > <348951516742...@web54j.yandex.ru> >> 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 IN

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

2018-01-23 Thread Kyotaro HORIGUCHI
Thank you for looking this. At Wed, 24 Jan 2018 00:13:51 +0300, Sergei Kornilov wrote in <348951516742...@web54j.yandex.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 C

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

2018-01-23 Thread Andrey Borodin
Hi! > 24 янв. 2018 г., в 2:13, Sergei Kornilov написал(а): > > 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: mis

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

2018-01-23 Thread Sergei Kornilov
Hello I tested this patch and think it can be commited to master. Is there a CF record? I can not find one. 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 t

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

2018-01-18 Thread Kyotaro HORIGUCHI
Hello. At Fri, 19 Jan 2018 01:16:56 +0300, Alexander Korotkov wrote in > On Thu, Jan 18, 2018 at 8:48 AM, Kyotaro HORIGUCHI < > horiguchi.kyot...@lab.ntt.co.jp> wrote: > > Index only scan is not usable in the case since the first index > > column cannot be rechecked but check_index_only makes

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

2018-01-18 Thread Alexander Korotkov
On Thu, Jan 18, 2018 at 8:48 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > At Wed, 17 Jan 2018 22:26:15 +0300, Sergei Kornilov > wrote in <412861516217...@web38o.yandex.ru> > > Hello > > I can reproduce on actual 9.6.6, 10.1 and fresh master build > > (9c7d06d60680c7f00d931233

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

2018-01-18 Thread Kyotaro HORIGUCHI
Hello. At Thu, 18 Jan 2018 17:25:05 +0900, Michael Paquier wrote in <20180118082505.ga84...@paquier.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. >

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

2018-01-18 Thread Kyotaro HORIGUCHI
At Thu, 18 Jan 2018 12:57:38 +0500, Andrey Borodin wrote in <62c2b9a0-51bc-40ff-9bca-f203784cb...@yandex-team.ru> > Hello! > > 18 янв. 2018 г., в 10:48, Kyotaro HORIGUCHI > > написал(а): > > > > Gist imposes the ninth strategy to perform index only scan but > > planner is not considering that

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

2018-01-18 Thread Michael Paquier
On Thu, Jan 18, 2018 at 12:57:38PM +0500, Andrey Borodin wrote: >> 18 янв. 2018 г., в 10:48, Kyotaro HORIGUCHI >> написал(а): >> >> 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

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

2018-01-17 Thread Andrey Borodin
Hello! > 18 янв. 2018 г., в 10:48, Kyotaro HORIGUCHI > написал(а): > > 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

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

2018-01-17 Thread Kyotaro HORIGUCHI
Hello, Gist imposes the ninth strategy to perform index only scan but planner is not considering that. At Wed, 17 Jan 2018 22:26:15 +0300, Sergei Kornilov wrote in <412861516217...@web38o.yandex.ru> > Hello > I can reproduce on actual 9.6.6, 10.1 and fresh master build > (9c7d06d60680c7f00d931