Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
From: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
To: a.korotkov@postgrespro.ru
Cc: sk@zsrv.org, david@nlpgo.com, pgsql-bugs@lists.postgresql.org,
pgsql-hackers@postgresql.org
Date: 2018-01-19T01:00:36Z
Lists: pgsql-bugs, pgsql-hackers
Hello. At Fri, 19 Jan 2018 01:16:56 +0300, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote in <CAPpHfdvJeYrnAsXhKRfO_NMDUaWQyK+wyhcv4zOdRzTdfNCkkw@mail.gmail.com> > On Thu, Jan 18, 2018 at 8:48 AM, Kyotaro HORIGUCHI < > horiguchi.kyotaro@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 wrong > > decision by the second occurance of "w'. There may be a chance > > that recheck is not required but we cannot predict that until > > actually acquire a tuple during execution. > > > > I didn't get this point. Same column is indexed twice using two > different opclasses. The first opclass doesn't support index-only scan, > while the second opclass does support it. So, if the first opclass needs > recheck then it can be rechecked using the value got from the second > opclass. Thus, I think we can potentially support index-only scan > in this case. > Another thing is that it's probably hard to do in our current > optimizer/executor/am > infrastructure. And assuming that use-case is quite narrow, and it looks To be exact, you're right. My description was abridged by omitting exactly what you mentioned above. The complexity needed to allow that doesn't seem worth adding. > OK to just disable such feature as bug fix. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Improve stability of recently-added regression test case.
- afb5fb290e90 10.6 landed
- 6d2c760b059e 11.1 landed
- 4f6a77e46af2 9.5.15 landed
- 3e406417b8da 9.6.11 landed
- 17d6a8fb764c 12.0 landed
-
Fix IOS planning when only some index columns can return an attribute.
- be55bfc9386d 9.5.13 landed
- b5febc1d125c 11.0 landed
- 3f26be83ec1e 9.6.9 landed
- 147b59971eba 10.4 landed
-
Ability to advance replication slots
- 9c7d06d60680 11.0 cited
-
Allow no-op GiST support functions to be omitted.
- d3a4f89d8a3e 11.0 cited