Re: [PATCH] Fix: Partitioned parent index remains invalid after child indexes are repaired

Sami Imseih <samimseih@gmail.com>

From: Sami Imseih <samimseih@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Haibo Yan <tristan.yim@gmail.com>, Mohamed ALi <moali.pg@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-04-22T10:33:09Z
Lists: pgsql-hackers
> > One thing that I'm tempted to add is more scans to check indisvalid
> > across these commands, particularly after the individual ATTACH
> > PARTITION bits on each individual index.

That works.

> > A second thing.  Do you think that it would be worth adding a
> > partitioned table that has no leaves in some portion of the test?  I
> > was thinking about a partitioned table called idxpart2 attached to
> > idxpart in the first part of the test.  I've found this pattern
> > usually useful for this area of the code when recursing with
> > validatePartitionedIndex() from a parent.

Good idea.

> Both things have been added to the tests, and applied the result down
> to v14.  The patch was able to apply cleanly across the board, without
> conflicts.  That's rare, these days..

Sorry for the late reply, and thanks for getting this committed!

--
Sami Imseih
Amazon Web Services (AWS)



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. doc: Mention validation attempt during ALTER INDEX .. ATTACH PARTITION

  2. Allow ALTER INDEX .. ATTACH PARTITION to validate a parent index