Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phpuS-0004Ey-ME for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2023 10:53:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phpuQ-0006vX-Gv for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Mar 2023 10:53:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phpuQ-0006vO-6l for pgsql-hackers@lists.postgresql.org; Thu, 30 Mar 2023 10:53:34 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phpuN-0001il-Ia for pgsql-hackers@lists.postgresql.org; Thu, 30 Mar 2023 10:53:33 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CB9D4320092F; Thu, 30 Mar 2023 06:53:28 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 30 Mar 2023 06:53:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1680173608; x= 1680260008; bh=sovCF5iQEnSpmSWTf1MFOeGgWVLVb1LxIk1SlU4u6Ek=; b=n se4NUssi+kwRn3/lrdDTdAEDwBQLMHoAVUkWgr5Z6c3GxCOmh7PmKKva3CCB/CNh iCTwD1BklVpl+8aLfVXzUL/Vx4vwlH0QMPdVRQ1WV+0qrrpiYHFX89H0ifBeCszl fq+viAKhLPTysIZUmHY0R5W22Vt+FE/cyE1LQNW1xNaLkR+ev3XR0aV57/h/qodg M0EGKSQo/qR2PBzrM6QjIx0lCAuui+N0EiXSTjZ5pluz270m9v7EuaUupP3dEDLK wxIL6g8B1uOIimcyX91JWJDaWyZaAV81sHk/sGTcm/kaJOqr6X/WGsbts8l7O4NB Cv3TmdtUg6PVSzwpuRmhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehkedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Mar 2023 06:53:28 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 7ED39DB6; Thu, 30 Mar 2023 12:53:25 +0200 (CEST) Date: Thu, 30 Mar 2023 12:53:25 +0200 From: Alvaro Herrera To: Amit Langote Cc: Tom Lane , Pg Hackers Subject: Re: "variable not found in subplan target list" Message-ID: <20230330105325.y6uvpalspynf2frt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Mar-29, Amit Langote wrote: > On Wed, Mar 29, 2023 at 3:39 AM Tom Lane wrote: > > Alvaro Herrera writes: > > > So I'm back home and found a couple more weird errors in the log: > > > > > ERROR: mismatching PartitionPruneInfo found at part_prune_index 0 > > > DETALLE: plan node relids (b 1), pruneinfo relids (b 36) > > > > This one reproduces for me. > > I've looked into this one and the attached patch fixes it for me. > Turns out set_plan_refs()'s idea of when the entries from > PlannerInfo.partPruneInfos are transferred into > PlannerGlobal.partPruneInfo was wrong. Thanks for the patch. I've pushed it to github for CI testing, and if there are no problems I'll put it in. > Though, I wonder if we need to keep ec386948948 that introduced the > notion of part_prune_index around if the project that needed it [1] > has moved on to an entirely different approach altogether, one that > doesn't require hacking up the pruning code. Hmm, that's indeed tempting. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/