]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add try_index_open(), conditional variant of index_open()
authorMichael Paquier <michael@paquier.xyz>
Thu, 18 Jan 2024 06:04:39 +0000 (15:04 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 18 Jan 2024 06:04:39 +0000 (15:04 +0900)
commitb685b41cf0a3d7523ed4781be23497da0e9507b4
tree452114d891574ee08e1ad89140744812d22ba1fc
parent5f6ec27a64774b10ff8522bc745e5e993503011d
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
src/backend/access/index/indexam.c
src/include/access/genam.h