Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: sk@zsrv.org, michael.paquier@gmail.com, x4mmm@yandex-team.ru,
david@nlpgo.com, pgsql-hackers@postgresql.org
Date: 2018-10-15T18:48:24Z
Lists: pgsql-bugs, pgsql-hackers
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes: > At Thu, 01 Mar 2018 15:39:18 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote in <22609.1519936758@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 >> it does have a fetch function. So I added a test case in btree_gist. > Ah, It wasn't in my sight to test core in contrib. Thanks for > improving it. I've just noticed that this new test case is sometimes failing on CLOBBER_CACHE_ALWAYS buildfarm animals, eg here: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi&dt=2018-10-14%2022%3A11%3A00 (I've seen some similar failures before but hadn't looked into the reason for them.) I can duplicate the plan choice shown here if I stick in "ANALYZE inettmp", so presumably what is happening is that sometimes a background auto-analyze is managing to run and change the rowcount estimate. We don't really care about bitmap indexscan vs regular here, rather about index-only vs regular, so there's not anything much wrong with using the post-ANALYZE behavior. So I think what we should do to make this test case more stable is to change the VACUUM to VACUUM ANALYZE and accept the ensuing change in expected plan. I doubt this test failure would ever occur in normal builds, so I'm not going to risk touching it immediately before a release wrap. But I'll make the change tomorrow or so. regards, tom lane
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