Re: BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference.
Date
Msg-id 3326255.1696781873@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18150: The results returned by index only scan using gist index of bpchar and seqscan have difference.
Next
From: PG Bug reporting form
Date:
Subject: BUG #18151: pg_upgradecluster fails when column default refers to column