pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add try_index_open(), conditional variant of index_open()
Date: Thu, 18 Jan 2024 06:05:25 +0000
Message-ID: <E1rQLWn-001xoL-Fm@gemulon.postgresql.org> (raw)

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

Details
-------
https://git.postgresql.org/pg/commitdiff/8013850c853db67ee753e5b730231cfad846b806

Modified Files
--------------
src/backend/access/index/indexam.c | 49 +++++++++++++++++++++++++++++++++-----
src/include/access/genam.h         |  1 +
2 files changed, 44 insertions(+), 6 deletions(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1rQLWn-001xoL-Fm@gemulon.postgresql.org>
Permalink:  ../E1rQLWn-001xoL-Fm@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rQLWn-001xoL-Fm@gemulon.postgresql.org

 · 

reply

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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add try_index_open(), conditional variant of index_open()
  In-Reply-To: <E1rQLWn-001xoL-Fm@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