Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAecO-0004W1-Ve for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Oct 2018 17:19:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAecL-0002mc-6L for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Oct 2018 17:19:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAecK-0002mV-SJ for pgsql-hackers@lists.postgresql.org; Thu, 11 Oct 2018 17:19:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAecH-00018o-VT for pgsql-hackers@lists.postgresql.org; Thu, 11 Oct 2018 17:19:19 +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 w9BHJBD6008266; Thu, 11 Oct 2018 13:19:11 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , Jeevan Chalke , pgsql-hackers@lists.postgresql.org, David Rowley Subject: Re: Soon-to-be-broken regression test case In-reply-to: <20181011165251.k7ggwmvmlfjv33gr@alvherre.pgsql> References: <20181011165251.k7ggwmvmlfjv33gr@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 11 Oct 2018 13:52:51 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8264.1539278351.1@sss.pgh.pa.us> Date: Thu, 11 Oct 2018 13:19:11 -0400 Message-ID: <8265.1539278351@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2018-Oct-11, Tom Lane wrote: >> Hm, I'm not seeing any regression test result changes there. However, >> if you're just executing queries and not EXPLAIN'ing them, it's possible >> something unwanted is happening under the hood. > Hmm, no, the explains are there. Here's one example -- maybe your new > planner smarts do not change these plans for some reason Oh, I see --- these are just "scalar-result sub-SELECTs", not sub-select-in-FROM, so they never get into the join tree to begin with. WHERE EXISTS is an exception because we attempt to translate it to a JOIN_SEMI join, exposing an opportunity for subquery pullup. regards, tom lane