pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
3+ messages / 1 participants
[nested] [flat]

* pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
@ 2021-11-01 02:41 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2021-11-01 02:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/add5cf28d48149459466b9aff374d78aebf17482

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
@ 2021-11-01 02:41 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2021-11-01 02:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY
@ 2021-11-01 02:41 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2021-11-01 02:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/77f7909a409eac9ee9a5728a4f80741925580fb6

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(+)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-11-01 02:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 02:41 pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY Michael Paquier <michael@paquier.xyz>
2021-11-01 02:41 pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY Michael Paquier <michael@paquier.xyz>
2021-11-01 02:41 pgsql: Preserve opclass parameters across REINDEX CONCURRENTLY Michael Paquier <michael@paquier.xyz>

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