From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: sk@zsrv.org
Cc: michael.paquier@gmail.com
Cc: x4mmm@yandex-team.ru
Cc: david@nlpgo.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
Date: Mon, 15 Oct 2018 14:48:24 -0400
Message-ID: <14643.1539629304@sss.pgh.pa.us> (raw)
In-Reply-To: <20180307.092638.115232766.horiguchi.kyotaro@lab.ntt.co.jp>
References: <348951516742031@web54j.yandex.ru>
<20180124.161153.214591193.horiguchi.kyotaro@lab.ntt.co.jp>
<22609.1519936758@sss.pgh.pa.us>
<20180307.092638.115232766.horiguchi.kyotaro@lab.ntt.co.jp>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, horiguchi.kyotaro@lab.ntt.co.jp, sk@zsrv.org, michael.paquier@gmail.com, x4mmm@yandex-team.ru, david@nlpgo.com, pgsql-hackers@postgresql.org
Subject: Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.
In-Reply-To: <14643.1539629304@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox