From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jeevan Chalke <jeevan.chalke@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org, David Rowley <david.rowley@2ndquadrant.com>
Subject: Re: Soon-to-be-broken regression test case
Date: Thu, 11 Oct 2018 13:52:51 -0300
Message-ID: <20181011165251.k7ggwmvmlfjv33gr@alvherre.pgsql> (raw)
In-Reply-To: <5749.1539276324@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, jeevan.chalke@enterprisedb.com, david.rowley@2ndquadrant.com
Subject: Re: Soon-to-be-broken regression test case
In-Reply-To: <20181011165251.k7ggwmvmlfjv33gr@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox