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 1qdmkv-004jed-6n for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Sep 2023 07:15:17 +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 1qdmku-007irj-11 for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Sep 2023 07:15:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdmkt-007irL-Iy for pgsql-bugs@lists.postgresql.org; Wed, 06 Sep 2023 07:15:15 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qdmkl-0030qI-Pd for pgsql-bugs@lists.postgresql.org; Wed, 06 Sep 2023 07:15:14 +0000 Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: a.lepikhov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id C719DE20E67; Wed, 6 Sep 2023 10:15:04 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1693984505; bh=ar56g5BPu5TM0WXL1kiwnw2ycMKwKmAYpBjN/BnPY4I=; h=User-Agent:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:From; b=q+x5gdYzKp93K352Qrb66hOH8wYmhLCokd0e81EAOsyNJLhaIDACkW05XMeC0KveL YTkszaCj4ZXbvvzQLDU41N/qHG0GI+5TWUgpQ/gAR/5vDr/o38Aa8JRscHwLdqhReP 0Pth695C0ukOutfHNCVvRHoOQlcFCqkFOmXhtg90Qst+LttSRUT+aBKeO6zA+mZ9Wa kQ6wfvbBJQ6zACh1mAYq12fnhPdmn598PbgIaA5QYniwZB9I6G3oBXTz2WHhNqED5o hpAWa4sewH7pB2Wcm9g/RlheOqVuA6auUjPi/GkN+6TYXHI56+mqrluz1C0YypzpoJ UEWPbN5m9vHJA== Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 136CF27C0054; Wed, 6 Sep 2023 03:15:01 -0400 (EDT) Received: from imap53 ([10.202.2.103]) by compute1.internal (MEProxy); Wed, 06 Sep 2023 03:15:02 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudehvddguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvfevufgtgf esthhqredtreerjeenucfhrhhomhepfdfnvghpihhkhhhovhcutehnughrvghifdcuoegr rdhlvghpihhkhhhovhesphhoshhtghhrvghsphhrohdrrhhuqeenucggtffrrghtthgvrh hnpeekvdffkeegveelueegueeiudevheeikeejleffffdvgeetveehieejgfeuheekfeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghpih hkhhhovhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudefleeghedujeeh vddqfedttdeitdekfedvqdgrrdhlvghpihhkhhhovheppehpohhsthhgrhgvshhprhhord hruhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie8b149e1:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7D99E88005E; Wed, 6 Sep 2023 03:15:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-711-g440737448e-fm-20230828.001-g44073744 Mime-Version: 1.0 Message-Id: <620f0695-0d41-4811-aae7-fb8f572114f6@app.fastmail.com> In-Reply-To: References: <18077-b9db97c6e0ab45d8@postgresql.org> <694541.1693600870@sss.pgh.pa.us> <1237514.1693879473@sss.pgh.pa.us> <3f7bcdb7-c263-4c06-a138-140f5c3898ed@app.fastmail.com> Date: Wed, 06 Sep 2023 14:14:40 +0700 From: "Lepikhov Andrei" To: "Richard Guo" Cc: "Tom Lane" , fuboat@outlook.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18077: PostgreSQL server subprocess crashed by a SELECT statement with WITH clause Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 6, 2023, at 1:55 PM, Richard Guo wrote: > On Wed, Sep 6, 2023 at 11:40=E2=80=AFAM Lepikhov Andrei=20 > wrote: >> Hi, >>=20 >> I am writing here just because you change this specific part of code. >> Designing a custom node I found the problem with CTE and Subqueries. = The reproduction sample looks quite similar to yours: >>=20 >> create view tt24v as >> with cte as materialized (select r from (values(1,2),(3,4)) r) >> select (r).column2 as col_a, (rr).column2 as col_b from >> cte join (select rr from (values(1,7),(3,8)) rr limit 2) ss >> on (r).column1 =3D (rr).column1; >> explain (verbose, costs off) select * from tt24v; >>=20 >> but fails with the error "failed to find plan for CTE ..." with a cus= tom node over a JOIN.=20 > > The error message indicates that something must have gone wrong. I > don't know well enough about custom scan, but I cannot reproduce this > error with your query. Am I missing something? Yeah, you should design cusom node to reproduce it. I can't publish my c= urrent code, but will try to invent a simple example. --=20 Regards, Andrei Lepikhov