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 1wCgGq-002DZR-3B for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 16:05:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCgGo-00Cg4r-39 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Apr 2026 16:05:47 +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 1wCgGo-00Cg4j-1K for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 16:05:47 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wCgGm-000000013AV-3Lae for pgsql-hackers@lists.postgresql.org; Tue, 14 Apr 2026 16:05:47 +0000 Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id 73A6814000E4; Tue, 14 Apr 2026 12:05:41 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 14 Apr 2026 12:05:41 -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=1776182741; x=1776269141; bh=cYMaoaKjOR +XASFZyMRiT0P5jWlTHkZIEc6n6jmcT6w=; b=TX832vXssmYTa5/3qpf2sHpgAZ 5xBafP+11yHqlzDBb7iW/WuGkU0iT6+l+7p4lKpoTaFmsPaFJAU+8XFegQRWwGMc +Llv8jHVoEw1SocZl9LyUwqmd3YN4MeuK1+Z9flFB8Mpw6lAJYomyvgHwcHoOSME Rxod98pF7IkwHdzluY4yOo05gyfOa7z9XlaWPPzkW7sGHFWJS7p6kMLX3sMypCky LpVb6bXrcaoRHoyMFmWPlga4EmmFxehBsGnA34X1sKMq6sQI7UmJK11+tXKW4BG2 ZBkcxVoCQm5vD5sj3ji7+u4IipBiLaZsgl8DfoFNpOEnfBENljHtSI0llhZw== 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= 1776182741; x=1776269141; bh=cYMaoaKjOR+XASFZyMRiT0P5jWlTHkZIEc6 n6jmcT6w=; b=otbFWQ3+OzwI8wrwDDjBfQCS3IsMC3w8e4GQMEnVeu9nixgwP8Y 4xCtYEtZ0uxIY52bnYxO2++y3U2eiwicbbEMQpRg9jPmt70F1aEOm93lWq4w8HbB xlYHNy6VIi2S7jHhRM1nXDuMDvAHlPMxZZxwvRBLvUUqcpqaMo+ywKI5l1fBZ+Ui FfeZXDZcF2OL9ZnYkYUsbiZ952pSMuD2nYxoPrjkhSiP5Wb50Dt/6FazIOR79U6O oxD7D5YLlH8lLxQTLGYVP6HKJgt0irFySXQ8fg7MJWZY1G7gE9y1MCUjysG7P1It FHQPu0wL9K7Ci+PfJlE+2UiZZC25i+IKuHQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdegudehlecutefuodetggdotefrod 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; Tue, 14 Apr 2026 12:05:40 -0400 (EDT) Date: Wed, 15 Apr 2026 01:05:38 +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="Px/GKJAInXPYn7yT" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Px/GKJAInXPYn7yT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ch= eck if >> the parent index is not valid, then validatePartitionedIndex() ? >=20 > 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 --Px/GKJAInXPYn7yT Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmneZdIACgkQnvQgOdby QH2SwQ//X+sms7UMmbLWLeps8eh+9yNqugmtQpqQCAHbxfGg/kkkKqJp7iIKbjCz VnW5yW5lKh7docJBxgQITdGDO3jhx037eZvDDYBR2EEn0Lj+M+HtcEMU29ImZO4u 3H4iRJbLOUH8Berjrjn2FAlGSdKqabHsBj1br58SMFqBFj8nF4sEit+sUGPG0Adz GgaL6aLuPIp0GAhgG/Uo1YxIrNxnM65s+08L3dKKWCn6UFvwIoAjkkOEGm7i662O fzML6WJkmkdhlrkn+cDeM2qwVqBCMVFH9b6uGBM1uqnsN+o2tMMwW5m4iNbrjz1V IY06veCGmLZBv6QZl2/bwpHzkOK6RX+NG7qER12Bgt/znOzfIDZbunCeHFtNVlsb DP0CJc89wVZylqTfV/Q6uDwQFNsi94lvH8qqGw4t1QMTNhBFQHIP9AoABTtxamw6 A+8bn4QCjY0bXrTOHOYz08RtD+7qI/AbCYFMp+9buZkptQxOjCWeBKgtEWdebnAV 2A6Mp/3H3NMqipABkl1DUaxq6IDz8tjjQn5jp1HThq+hIIKiQqIj5KRq371SFY/b CWAVUnLAP8yb79s/kup9u9I+Zgwm5LWSc1332d45VW8WZ2rJ9zv/zti0qz7ejzIl uwbGXFmML4QLwhsr28HkGJOxsGnoSTqKosF9h2x81ey1bweyfCI= =Oywd -----END PGP SIGNATURE----- --Px/GKJAInXPYn7yT--