From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: dan.barbulescu@hollo.software
Subject: BUG #16895: Multicolumn GiST index returns incomplete results
Date: Wed, 24 Feb 2021 11:34:23 +0000
Message-ID: <16895-541ff4d9825dcd3c@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16895
Logged by: Dan Bărbulescu
Email address: dan.barbulescu@hollo.software
PostgreSQL version: 13.2
Operating system: Debian GNU/Linux 10 (buster)
Description:
CREATE EXTENSION
IF NOT EXISTS
ltree;
CREATE EXTENSION
IF NOT EXISTS
btree_gist;
CREATE TABLE
test
AS
SELECT
_ ::TEXT ::ltree AS path,
_ ::bit(4) AS flags
FROM
GENERATE_SERIES(1, 1024000) _;
-- A large-ish table is needed, the results don't usually vary by a lot
SELECT
flags,
COUNT(*)
FROM
test
GROUP BY
1
ORDER BY
1;
-- The values are evenly distributed
CREATE INDEX ON
test
USING
gist(path, flags);
-- The "offending" index
SELECT
COUNT(*)
FROM
test
WHERE
flags = '0000';
-- Reindexing sometimes produces different results. This is as much as I've
been able to narrow it down, I haven't been able to reproduce with other
data types (i.e. text instead of ltree) or shorter bit strings.
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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, dan.barbulescu@hollo.software
Subject: Re: BUG #16895: Multicolumn GiST index returns incomplete results
In-Reply-To: <16895-541ff4d9825dcd3c@postgresql.org>
* 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