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 1gAeCu-0000Q8-L5 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Oct 2018 16:53:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAeCs-0005aR-Bx for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Oct 2018 16:53:02 +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 1gAeCs-0005aI-0M for pgsql-hackers@lists.postgresql.org; Thu, 11 Oct 2018 16:53:02 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gAeCk-0000bG-Oz for pgsql-hackers@lists.postgresql.org; Thu, 11 Oct 2018 16:53:00 +0000 Received: by mail-qt1-x834.google.com with SMTP id d8-v6so10615170qtk.13 for ; Thu, 11 Oct 2018 09:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=3/0vS/pIrBQyVpmB6vuACWxD2eIZcXMKEkEyOBg0DkE=; b=OUgquTm6B9xztcfLRdBcGyMy1DJFYHJfceICAfBYvtX/rCBibPpSradH/dVgOhS9EE r8HQNcQ6e4VRpw0QCHGTzwvAzSHahX3X5tiDDAxf1bkyCRNtmu8GBlNaQh6pYUOreo6Y cffJtPhoROX0kw0QNfXJZnnP/+RStqklbP9L5QSiqTJ9AM8jd1H60NSPv9xC8EXaS+bl T9vbikFfPArwaUaPIuW6kcLJMJmG7+i64s9XqoR71M7TWIawTjwDawClN5ENx8BgZGTd iGgfB6+OoXi2rc0lu1+PFsGYCrxdCLRyAaGaXfXh/OMPQmh5IIQShT8i5Xw2WGOsMhhT C4tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=3/0vS/pIrBQyVpmB6vuACWxD2eIZcXMKEkEyOBg0DkE=; b=g5hHDIbnWv1oadv1uuCwPk9T7qODwmSo28v3B4bm7LJ0SREaejCrFyYMQa4e5UcOAU oNNzkgVFgqoqcbPdh/qD8P0mooBSLG+NULMXU6x49fXSu968y+9QdT/kG0cxJ6r6YzUU Cq7aMR6HZHibxDpOClETMxzIRC+KLN/AnbUOMMSc7i0s8b9zBqJ0R1VbtxTSY3kstw2v vxTUUMNA2DPTY2i/LCBJf8EcGkg29HHGAzo/uqooEuPP/aRbHVlWFKDViP36RpyeV0/H bETe1h2eiof1v3askEbFaZIAzL2CQOY8fGbMfNSt9tCYI4ovpHWuZ5pwgRhket+2rsK8 uk9A== X-Gm-Message-State: ABuFfoia1Wz1B44uiWdDtZyCzsXe1QCzcHleNAlPSlo4z5pVjzrdxP3N w7aY5dBx0KGeMtzHal7UNlP5iA== X-Google-Smtp-Source: ACcGV60xEzJbbqvJkrmUF40NUHboPJ4mbYtFZNkjdqmODYw4uw4RFduD8qxa88ALWosKKH4PT5oh7Q== X-Received: by 2002:a0c:eb10:: with SMTP id j16-v6mr2351212qvp.95.1539276773777; Thu, 11 Oct 2018 09:52:53 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id n25-v6sm17213998qtf.14.2018.10.11.09.52.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Oct 2018 09:52:53 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 785EF72C; Thu, 11 Oct 2018 13:52:51 -0300 (-03) Date: Thu, 11 Oct 2018 13:52:51 -0300 From: Alvaro Herrera To: Tom Lane Cc: Robert Haas , Jeevan Chalke , pgsql-hackers@lists.postgresql.org, David Rowley Subject: Re: Soon-to-be-broken regression test case Message-ID: <20181011165251.k7ggwmvmlfjv33gr@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5749.1539276324@sss.pgh.pa.us> User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 (I note that you mentioned EXISTS in your OP, which this one does not use; I further note that we don't use EXISTS anywhere in partition_prune.sql, which probably amounts to uncovered cases): prepare ab_q2 (int, int) as select a from ab where a between $1 and $2 and b < (select 3); explain (analyze, costs off, summary off, timing off) execute ab_q2 (2, 2); QUERY PLAN -------------------------------------------------------- Append (actual rows=0 loops=1) InitPlan 1 (returns $0) -> Result (actual rows=1 loops=1) Subplans Removed: 6 -> Seq Scan on ab_a2_b1 (actual rows=0 loops=1) Filter: ((a >= $1) AND (a <= $2) AND (b < $0)) -> Seq Scan on ab_a2_b2 (actual rows=0 loops=1) Filter: ((a >= $1) AND (a <= $2) AND (b < $0)) -> Seq Scan on ab_a2_b3 (never executed) Filter: ((a >= $1) AND (a <= $2) AND (b < $0)) (10 rows) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services