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.94.2) (envelope-from ) id 1qdQQD-003L6T-Ja for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 07:24:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qdQQB-0000Ug-St for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Sep 2023 07:24:23 +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.94.2) (envelope-from ) id 1qdOfF-00GwkR-8k for pgsql-bugs@lists.postgresql.org; Tue, 05 Sep 2023 05:31:49 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdOfA-0037v3-9e for pgsql-bugs@lists.postgresql.org; Tue, 05 Sep 2023 05:31:48 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 2E2DA581259; Tue, 5 Sep 2023 01:31:42 -0400 (EDT) Received: from imap53 ([10.202.2.103]) by compute1.internal (MEProxy); Tue, 05 Sep 2023 01:31:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1693891902; x=1693892502; bh=UDamppUI4Exs03i4+NfzYno2x fJ9P+WZ1uwua9Kg07Y=; b=NZ+fcD4AiFfPypK47Xt07g11K0ILv0aLnop9o24vN WSqbqy12hN9xw22L3R61LY52IPsRjA2fOgyGSfzqOhyjk8hPT9DEfjXDS7uyBC7b 8BI/a87/pjfGZRUtw5z9HZ7G4qijD//oon2Ip4WDrZGX6/9U3BnUkrGUwoavXjE+ y5OKJ32UnJpk9qV3LTa2KQis166mVeKaS8RRuC3KVI/6cEftt4hZnykReEJyW/de e2EZ/luc6WiJJy5Qlvr+YAAcuBdHkCiTxexT37SC58LNyKewteIFLUEWj3KNVnsx N/yjSXxk9Nf7mErA/GVE2P+mu5tRDY9JO2XZ6XupfwNlQ== 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: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=i80a949e3.fm1; t=1693891902; x=1693892502; bh=UDamppUI4Exs03i4+NfzYno2xfJ9P+WZ 1uwua9Kg07Y=; b=GbPgguEGLra0NEkMep2GSSkLUli9yMA9jqsm5pyY09QRpTPi mLsYgCbh/acPHQaEqK6/LYRCDbsuW810SUuUC3HBnQXtfnDHuHT1e+cAsrzdJbeP dkAyLIne6aym6ak+dDC2fil2uAwFsCmYDVNnoax+p7qfpmZCzBm4ESTq0ZMv+Ncr b3JLB4TEaVvlL1cuDoS734cWLTW50P429nxXlJt3VaEAqR0eYyKuzLMnTo4qYr24 RhIr8mhvwo1eDXvKPN+boFM9ehhGFmpbqj9m1geRfauuLVYQnS55etO+AIZKMyjh 9VA/4SlttqVZFlplZx1y2QvE7LlYtWcP/9DGSg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegledgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvvefutgesthdtre dtreertdenucfhrhhomhepfdfnvghpihhkhhhovhcutehnughrvghifdcuoehlvghpihhk hhhovhesfhgrshhtmhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpeehueejfeevgf egteeuffetfeduteffvddvjedvfefhheetjeelhfevgedtffehveenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghpihhkhhhovhesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i80a949e3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9BBAE88005E; Tue, 5 Sep 2023 01:31:41 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-701-g9b2f44d3ee-fm-20230823.001-g9b2f44d3 Mime-Version: 1.0 Message-Id: Date: Tue, 05 Sep 2023 12:31:18 +0700 From: "Lepikhov Andrei" To: pgsql-bugs@lists.postgresql.org, tgl@sss.pgh.pa.us Cc: =?UTF-8?Q?=D0=90=D0=BB=D0=B5=D0=BD=D0=B0_=D0=A0=D1=8B=D0=B1=D0=B0=D0=BA?= =?UTF-8?Q?=D0=B8=D0=BD=D0=B0?= , =?UTF-8?Q?=D0=94=D0=B0=D0=BC=D0=B8=D1=80_=D0=91=D0=B5=D0=BB=D1=8F=D0=BB?= =?UTF-8?Q?=D0=BE=D0=B2?= Subject: EXPLAIN Verbose issue - custom_scan_tlist can directly refer CTE and Subquery Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, While designing a CustomScan node, I got stuck into two errors: 1. "failed to find plan for CTE." 2. "failed to find plan for subquery." After a short research, I found commit 3f50b82, which shows the problem's origins - setrefs don't change the varno of custom_scan_tlist and can directly reference CTE or Subquery entry. In the "EXPLAIN VERBOSE" case, the deparsing routine can't find dpns->inner_plan for such an entry. Regards, Andrei Lepikhov