From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add try_index_open(), conditional variant of index_open() |
Date: | 2024-01-18 06:05:25 |
Message-ID: | E1rQLWn-001xoS-HJ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add try_index_open(), conditional variant of index_open()
try_index_open() is able to open an index if its relkind fits, except
that it would return NULL instead of generated an error if the relation
does not exist. This new routine will be used by an upcoming patch to
make REINDEX on partitioned relations more robust when an index in a
partition tree is dropped.
Extracted from a larger patch by the same author.
Author: Fei Changhong
Discussion: https://postgr.es/m/tencent_6A52106095ACDE55333E3AD33F304C0C3909@qq.com
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b685b41cf0a3d7523ed4781be23497da0e9507b4
Modified Files
--------------
src/backend/access/index/indexam.c | 49 +++++++++++++++++++++++++++++++++-----
src/include/access/genam.h | 1 +
2 files changed, 44 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-01-18 07:32:21 | pgsql: Improve handling of dropped partitioned indexes for REINDEX INDE |
Previous Message | Michael Paquier | 2024-01-18 02:13:29 | pgsql: lwlock: Fix quadratic behavior with very long wait lists |