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: Improve handling of dropped partitioned indexes for REINDEX INDE
Date: Thu, 18 Jan 2024 07:32:21 +0000
Message-ID: <E1rQMsv-001yDA-Ai@gemulon.postgresql.org> (raw)

Improve handling of dropped partitioned indexes for REINDEX INDEX

A REINDEX INDEX done on a partitioned index builds a list of the indexes
to work on before processing its partitions in individual transactions.
When combined with a DROP of the partitioned index, there was a window
where it was possible to see some unexpected "could not open relation
with OID", synonym of relation lookup error.  The code was robust enough
to handle the case where the parent relation is missing, but not the
case where an index would be gone missing.

This is similar to 1d65416661bb.

Support for REINDEX on partitioned relations has been introduced in
a6642b3ae060, so backpatch down to 14.

Author: Fei Changhong
Discussion: https://postgr.es/m/tencent_6A52106095ACDE55333E3AD33F304C0C3909@qq.com
Backpatch-through: 14

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/catalog/index.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)



view thread (4+ messages)  latest in thread

Message-ID: <E1rQMsv-001yDA-Ai@gemulon.postgresql.org>
Permalink:  ../E1rQMsv-001yDA-Ai@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rQMsv-001yDA-Ai@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: Improve handling of dropped partitioned indexes for REINDEX INDE
  In-Reply-To: <E1rQMsv-001yDA-Ai@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