From: Tom Lane <tgl@sss.pgh.pa.us>
To: ocean_li_996@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference.
Date: Sun, 08 Oct 2023 12:17:53 -0400
Message-ID: <3326255.1696781873@sss.pgh.pa.us> (raw)
In-Reply-To: <18150-b3922f47e62d4d12@postgresql.org>
References: <18150-b3922f47e62d4d12@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> PostgreSQL version: 11.9
> When testing consistency between index (only) scan and seqscan, I found that
> the results returned by index only scan using gist index of bpchar and
> seqscan have difference.
This was fixed last year, in 11.15 (and releases of same date in other
branches). Per those release notes:
Fix results of index-only scans on contrib/btree_gist indexes on char(N)
columns (Tom Lane)
Index-only scans returned column values with trailing spaces removed,
which is not the expected behavior. That happened because that's how
the data was stored in the index. This fix changes the code to store
char(N) values with the expected amount of space padding. The behavior
of such an index will not change immediately unless you REINDEX it;
otherwise space-stripped values will be gradually replaced over time
during updates. Queries that do not use index-only scan plans will be
unaffected in any case.
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, ocean_li_996@163.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference.
In-Reply-To: <3326255.1696781873@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