Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wEaJG-004AoY-2R for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Apr 2026 22:08:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wEaJG-00Gb01-07 for pgsql-hackers@arkaria.postgresql.org; Sun, 19 Apr 2026 22:08:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wEaJF-00Gazt-2S for pgsql-hackers@lists.postgresql.org; Sun, 19 Apr 2026 22:08:09 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wEaJD-0000000226o-2T1N for pgsql-hackers@lists.postgresql.org; Sun, 19 Apr 2026 22:08:09 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 9E1D11D0014E; Sun, 19 Apr 2026 18:08:05 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Sun, 19 Apr 2026 18:08:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1776636485; x=1776722885; bh=4BgXcZVCHC WIPTui9fV5YIdJLd9xkIWqIJQYGiaYJNg=; b=Negca2gq1PszqvB6Y59nmP0gCQ BSaUzHl0scOlOoOUPGobg0fm/vKA9ZOcpWwY6csVl91IUVNDcdjySzx9B7AenHOy C6NQ95JQsP95h5hsdoz84PcnOx3Mm0dwnddEyHFmGSHaxP/TOC+J66/KvQbRKHGr kh0FAvb8EV3Y9gH0qXaIy4C8/KRqFxM4Fdizu9xTs+BbB0/aBkORKkgnefL3VjCa LCmq4tvcX3yikI6vrbkeaf0Md0YjuuM6djKUVmrfLejjwipLf8XViCvyCsotmPtC hMXZ6z+s2522fECm38VEFj29OY4eMg7hmgLK1d8WCArJTkJJ7E+F+VYB7ghA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1776636485; x=1776722885; bh=4BgXcZVCHCWIPTui9fV5YIdJLd9xkIWqIJQ YGiaYJNg=; b=ZAceCcGLxZQiNbFtgFwNhxp+/t4mwgSPCtaP5OwPxzhXxDJmqAH Nev+P9d4x5ItatikTIUPKs0xh4rCMOwJCqX1uouoYh/tBhkixmjYFZMz/2M7kw8o p+C0oeDnLJ8VYF1l86lGAXq24GsbVP5zVtxkrXy7HrIUFx/0yLZT+vcolV723idy dUaTRMkoWGfTmVbn7WIwc8tTYMX2iZZgEfa0XdrIDChtBEmMG9RRvA0Am7E3kU2f A54i96XfZI7mY4Muy++8VZPN1/taACFxjfcpfw0kk2c4s6oQc20zYsW2bWorm8kK ExXFYE4a7ewI9LhY89o7J/xHS3fC2WSBdAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdehieektdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsrghmih hmshgvihhhsehgmhgrihhlrdgtohhmpdhrtghpthhtohepthhrihhsthgrnhdrhihimhes ghhmrghilhdrtghomhdprhgtphhtthhopehmohgrlhhirdhpghesghhmrghilhdrtghomh dprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgv shhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 19 Apr 2026 18:08:03 -0400 (EDT) Date: Mon, 20 Apr 2026 07:07:59 +0900 From: Michael Paquier To: Sami Imseih Cc: Haibo Yan , Mohamed ALi , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Fix: Partitioned parent index remains invalid after child indexes are repaired Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ubv8NtJQshoHDym8" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ubv8NtJQshoHDym8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 18, 2026 at 09:37:48AM -0500, Sami Imseih wrote: > Here is the patch with tests. It adds a test for this case using > multi-level partitions and ensures that the parent indexes are > validated once a child index is set to valid. Also, I added the > negative case where only one child index is validated to ensure > that the parent indexes remain invalid. That looks sensible here, including the test coverage. Thanks for the patch! 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. 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=20 usually useful for this area of the code when recursing with validatePartitionedIndex() from a parent. I was also thinking about a partitioned table idxpart3 in the last test block, but as you want to check that indisvalid is not flipped to true for the parent if a child is !indisvalid, it would not be adapted. -- Michael --ubv8NtJQshoHDym8 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnlUj8ACgkQnvQgOdby QH04CQ/8CwKxFc0y5f1VdhkX1EYjCh1YBMJyDrqZ5SP7h+U1MQuKNqyzggHCyd8W CdSVOozVeh89we54jqmMirktih7NlUe9jkaetuaut9/Sv9OawwDB1Mxz4fiVqlT1 BrrVWVjOpP3QPgwbj99r3kYD3qZUs09V6O9+UQDtM+cdUu/LPtE4K7N1CImlOhmL pFZcBierfD+KoG/S8oSvVqwXUewzx4x7L3SBBFOuaSJ8oXcDfLpiH8Vgs3Qij/yc nLNiRCfobwMYvFzxf+ZFH3pTRnoKDv6gKzmj0nDiDg+5N0lgpRT0DeLTZOh9oWZ4 NbhkdzDdU4gl2wPnan20/Fq1zmrDV/C8u3uyzrL6o8XczoC1DJ/PNFio/8PEEVzw Pbq0gKzDhEZ+fiBGs19WTe0lK9CVtKW6zuAhQZTIB/0kMsNwP79Npo71xrir1BDX w0dgvOaXoJ6BIntIWTj+ydzyeT2IISUF8G7NuimtTghzfDA7SoBlvDHR2+PKRe91 NkpABsnhFH0XpcsLzSM0gfqywjlwmd15UYJ5w0TyiuTlM9Jb8EikpmUZ+uWNFfxT LquJwFtQM83EcR1CWBx0fx2EZmgTNBlXHK9HCPyx+2fU4ms0qu16xBvfmBPSeAmD NPkGqoOn8mBj8NH5Ns3KSivwjlp2Mo5ZMZxUfN57YFjLInvaCeA= =M/Hd -----END PGP SIGNATURE----- --ubv8NtJQshoHDym8--