From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ensure we allocate NAMEDATALEN bytes for names in Index Only Sca
Date: Wed, 01 May 2024 01:22:33 +0000
Message-ID: <E1s1yg4-000sS1-Gn@gemulon.postgresql.org> (raw)
Ensure we allocate NAMEDATALEN bytes for names in Index Only Scans
As an optimization, we store "name" columns as cstrings in btree
indexes.
Here we modify it so that Index Only Scans convert these cstrings back
to names with NAMEDATALEN bytes rather than storing the cstring in the
tuple slot, as was happening previously.
Bug: #17855
Reported-by: Alexander Lakhin
Reviewed-by: Alexander Lakhin, Tom Lane
Discussion: https://postgr.es/m/17855-5f523e0f9769a566@postgresql.org
Backpatch-through: 12, all supported versions
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/52f21f928732418b333232a36fb02890f9c87b52
Modified Files
--------------
src/backend/executor/nodeIndexonlyscan.c | 95 +++++++++++++++++++++++++--
src/include/catalog/pg_opclass.dat | 7 +-
src/include/nodes/execnodes.h | 4 ++
src/test/regress/expected/index_including.out | 25 +++++++
src/test/regress/sql/index_including.sql | 19 ++++++
5 files changed, 141 insertions(+), 9 deletions(-)
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-committers@postgresql.org
Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Ensure we allocate NAMEDATALEN bytes for names in Index Only Sca
In-Reply-To: <E1s1yg4-000sS1-Gn@gemulon.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