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 1phDv6-0007Wh-Kq for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 18:19:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1phDv5-000058-Gg for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Mar 2023 18:19:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phDv4-00004r-G7 for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 18:19:43 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phDv0-0001Lu-Pc for pgsql-hackers@lists.postgresql.org; Tue, 28 Mar 2023 18:19:42 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E3E455C0098 for ; Tue, 28 Mar 2023 14:19:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 28 Mar 2023 14:19:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1680027573; x=1680113973; bh=Z z0CO0knkE86g/SXD38ePLedlsyWGzjg/TIJjci5JFM=; b=c9RhoiMWqYBwO+1gD FLS16WPYzXHB9k4I1I2HiPMeaa/CdPOzz60aWlJA+ek8izllR9BAwHTh7pe0geGY 7GvCE+luxmF96hV68m9zNOzPTUgMFTH7/ERnsy+lo05xNcdpUVRLEd+ZFQQNYa3J EpXo0QqTHuUIo/oTv4isLfYzlx7uXVSvoexAYJQ8M2gHsRYzCZOpAk7MKde+eYMZ g/On4fNs7d33n5VXACn1d4eGDockd2tsNX2JijtsEN4QM3AfoUdzc7uEQi58Nyfe Ctf8P/EBk9glAMRhl+z6AxETPQnWMYRHeyDEg9bReu3KkIH5JEjdzE5HO/lIx1nl 4trDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehgedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepfeduleekteeigfegledtvddvvddtledugfefhfdtieev teeftdeuueehudeuvdelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh dpphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 28 Mar 2023 14:19:33 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 08741386; Tue, 28 Mar 2023 20:19:31 +0200 (CEST) Date: Tue, 28 Mar 2023 20:19:30 +0200 From: Alvaro Herrera To: Pg Hackers Subject: Re: "variable not found in subplan target list" Message-ID: <20230328181930.s7xbr326635y4sfc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230328112248.6as34mlx5sr4kltg@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk So I'm back home and found a couple more weird errors in the log: MERGE INTO public.idxpart2 as target_0 USING (select 1 from public.xmltest2 as ref_0 inner join public.prt1_l_p1 as sample_0 inner join fkpart4.droppk as ref_1 on (sample_0.a = ref_1.a ) on (true) limit 50) as subq_0 left join information_schema.transforms as ref_2 left join public.transition_table_status as sample_1 on (ref_2.transform_type is not NULL) on (true) ON target_0.a = sample_1.level WHEN MATCHED THEN UPDATE set a = target_0.a; ERROR: mismatching PartitionPruneInfo found at part_prune_index 0 DETALLE: plan node relids (b 1), pruneinfo relids (b 36) This one is probably my fault, will look later. select pg_catalog.pg_stat_get_buf_fsync_backend() as c9 from public.tenk2 as ref_0 where (ref_0.stringu2 is NULL) and (EXISTS ( select 1 from fkpart5.fk1 as ref_1 where pg_catalog.current_date() < (select pg_catalog.max(filler3) from public.mcv_lists))) ; ERROR: subplan "InitPlan 1 (returns $1)" was not initialized CONTEXTO: parallel worker select 1 as c0 from (select subq_0.c9 as c5, subq_0.c8 as c9 from public.iso8859_5_inputs as ref_0, lateral (select ref_1.ident as c2, ref_0.description as c8, ref_1.used_bytes as c9 from pg_catalog.pg_backend_memory_contexts as ref_1 where true ) as subq_0 where subq_0.c2 is not NULL) as subq_1 inner join pg_catalog.pg_class as sample_0 on (subq_1.c5 = public.int8alias1in( cast(case when subq_1.c9 is not NULL then null end as cstring))) where true; ERROR: could not find commutator for operator 53286 There were quite a few of those "variable not found" ones, both mentioning singular "targetlist" and others that said "targetlists". I reran them with your patch and they no longer error out, so I guess it's all the same bug. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "I must say, I am absolutely impressed with what pgsql's implementation of VALUES allows me to do. It's kind of ridiculous how much "work" goes away in my code. Too bad I can't do this at work (Oracle 8/9)." (Tom Allison) http://archives.postgresql.org/pgsql-general/2007-06/msg00016.php