From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
Date: Mon, 01 Nov 2021 02:41:26 +0000
Message-ID: <E1mhNGI-0003wH-TC@gemulon.postgresql.org> (raw)
Preserve opclass parameters across REINDEX CONCURRENTLY
The opclass parameter Datums from the old index are fetched in the same
way as for predicates and expressions, by grabbing them directly from
the system catalogs. They are then copied into the new IndexInfo that
will be used for the creation of the new copy.
This caused the new index to be rebuilt with default parameters rather
than the ones pre-defined by a user. The only way to get back a new
index with correct opclass parameters would be to recreate a new index
from scratch.
The issue has been introduced by 911e702.
Author: Michael Paquier
Reviewed-by: Zhihong Yu
Discussion: https://postgr.es/m/YX0CG/QpLXcPr8HJ@paquier.xyz
Backpatch-through: 13
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f255de9a456531d917a7488ad9d084201dedcfd2
Modified Files
--------------
src/backend/catalog/index.c | 10 ++++++++++
src/test/regress/expected/create_index.out | 19 +++++++++++++++++++
src/test/regress/sql/create_index.sql | 9 +++++++++
3 files changed, 38 insertions(+)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
In-Reply-To: <E1mhNGI-0003wH-TC@gemulon.postgresql.org>
References: <E1mhNGI-0003wH-TC@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