Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKOcz-0007Ze-63 for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Apr 2019 14:48:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hKObz-0002Kj-2W for pgsql-hackers@arkaria.postgresql.org; Sat, 27 Apr 2019 14:47:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKOby-0002JT-LC; Sat, 27 Apr 2019 14:47:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hKObs-0006E5-3U; Sat, 27 Apr 2019 14:47:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x3RElDYL020777; Sat, 27 Apr 2019 10:47:13 -0400 From: Tom Lane To: Etsuro Fujita cc: Etsuro Fujita , sean.johnston@edgeintelligence.com, pgsql-bugs@lists.postgresql.org, pgsql-hackers@lists.postgresql.org Subject: Re: BUG #15781: subselect on foreign table (postgres_fdw) can crash (segfault) In-reply-to: References: <15781-2601b1002bad087c@postgresql.org> <25734.1556216681@sss.pgh.pa.us> <5CC2FC12.6050409@lab.ntt.co.jp> <30995.1556298600@sss.pgh.pa.us> Comments: In-reply-to Etsuro Fujita message dated "Sat, 27 Apr 2019 22:30:37 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20775.1556376433.1@sss.pgh.pa.us> Date: Sat, 27 Apr 2019 10:47:13 -0400 Message-ID: <20776.1556376433@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Etsuro Fujita writes: > On Sat, Apr 27, 2019 at 2:10 AM Tom Lane wrote: >> If we don't want to change what the core code does with fdw_exprs, >> I think the only way to fix it is to hack postgres_fdw so that it >> won't generate plans involving the problematic case. > Seems reasonable. >> See attached. > I read the patch. It looks good to me. I didn't test it, though. Thanks for looking! Have a good vacation ... regards, tom lane