public inbox for [email protected]
help / color / mirror / Atom feedFrom: 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: Tue, 14 Apr 2026 07:18:33 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0s16eHrzcDupipAxC++e-p_n_M7Fpg-MG-V59fB=wykLw@mail.gmail.com>
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>
On Sat, Apr 11, 2026 at 11:10:54AM -0500, Sami Imseih wrote:
> I don't think that a REINDEX should attempt to set the parent index indisvalid.
> It seems the responsibility for this falls squarely on the ATTACH
> PARTITION command,
> as it currently does.
Relying on REINDEX is not optimal, as it would mean that all the
partitioned indexes would need to be updated before flipping the flag.
If the indisvalid flags of the partitions are already true, this would
be a huge waste of resources.
> 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.
One better alternative that I could think of is a new flavor of ALTER
TABLE, like a ALTER TABLE foo VALIDATE PARTITION (no partition name
here) focused on flipping the indisvalid flags? This would not be
backpatchable, but it would make the whole flow lighter by not
requiring a redefinition of one partition.
--
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