public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Haibo Yan <[email protected]>
Cc: Mohamed ALi <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] Fix: Partitioned parent index remains invalid after child indexes are repaired
Date: Wed, 15 Apr 2026 01:05:38 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAGnOmWqi1D9ycBgUeOGf6mOCd2Dcf=6sKhbf4sHLs5xAcKVCMQ@mail.gmail.com>
	<CABXr29GbJe7-vbm0Fn=HWx3vQonwFtv_zO1pSc5FZAvjLuUDVA@mail.gmail.com>
	<CABXr29Epj=23eYAWg_mTdiXYQQzJSVN22uk6tK8ei0ts5wXvSQ@mail.gmail.com>
	<CAA5RZ0s16eHrzcDupipAxC++e-p_n_M7Fpg-MG-V59fB=wykLw@mail.gmail.com>
	<[email protected]>

On Tue, Apr 14, 2026 at 07:18:33AM +0900, Michael Paquier wrote:
> On Sat, Apr 11, 2026 at 11:10:54AM -0500, Sami Imseih wrote:
>> Would the right solution here be to try to have the ATTACH PARTITION  check if
>> the parent index is not valid, then validatePartitionedIndex() ?
> 
> This may be a backpatchable thing, even if it requires one to detach
> one partition before attaching it again, or attach a fake partition to
> force a flip of the flag, before detaching this fake partition.

Actually no.  Yesterday I was looking at that from the angle of using
ALTER TABLE for the job, that requires a partition bound.  Sami has
mentioned me that a repeated ALTER INDEX .. ATTACH PARTITION does not
fail when repeated, so we could just rely on that and enforce a
round of indisvalid across the partitioned index we are working on.

Could you write a patch?  It would be better to have tests with
multiple levels, at least, with a partitioned table being a leaf of
another partitioned table.  I am sure you get the picture, the point
being to recurse across multiple levels.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

view thread (12+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [PATCH] Fix: Partitioned parent index remains invalid after child indexes are repaired
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox