summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-12-12 13:49:54 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-12-12 13:49:54 -0500
commit22864f6e02f8fc19f6167442f13d1f917e36548e (patch)
tree15bf333a85579d16fcbef0beb2a10c3d64968143 /src
parent1a3efa1eb67ab752231a6fff2743a77ae55808d5 (diff)
downloadpostgresql-22864f6e02f8fc19f6167442f13d1f917e36548e.tar.gz
Put back regression test case in a more robust form.
This undoes my hurried commit 776a2c887, restoring the removed test case in a form that passes with or without force_parallel_mode = regress. It turns out that force_parallel_mode = regress simply fails to mask the Worker lines that will be produced by EXPLAIN (ANALYZE, VERBOSE). I'd say that's a bug in that feature, as its entire alleged reason for existence is to make the EXPLAIN output the same. It's certainly not a bug in the plan node pruning logic. Fortunately, this test case doesn't really need to use ANALYZE, so just drop that. Discussion: https://postgr.es/m/18891.1576109690@sss.pgh.pa.us
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/partition_prune.out13
-rw-r--r--src/test/regress/sql/partition_prune.sql7
2 files changed, 20 insertions, 0 deletions
diff --git a/src/test/regress/expected/partition_prune.out b/src/test/regress/expected/partition_prune.out
index bcfe21f19a..8219abc813 100644
--- a/src/test/regress/expected/partition_prune.out
+++ b/src/test/regress/expected/partition_prune.out
@@ -3161,6 +3161,19 @@ execute mt_q1(35);
(0 rows)
deallocate mt_q1;
+prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
+-- Ensure output list looks sane when the MergeAppend has no subplans.
+explain (verbose, costs off) execute mt_q2 (35);
+ QUERY PLAN
+--------------------------------
+ Limit
+ Output: ma_test.a, ma_test.b
+ -> Merge Append
+ Sort Key: ma_test.b
+ Subplans Removed: 3
+(5 rows)
+
+deallocate mt_q2;
-- ensure initplan params properly prune partitions
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;
QUERY PLAN
diff --git a/src/test/regress/sql/partition_prune.sql b/src/test/regress/sql/partition_prune.sql
index 825dedb5f0..61ef6e637e 100644
--- a/src/test/regress/sql/partition_prune.sql
+++ b/src/test/regress/sql/partition_prune.sql
@@ -838,6 +838,13 @@ execute mt_q1(35);
deallocate mt_q1;
+prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
+
+-- Ensure output list looks sane when the MergeAppend has no subplans.
+explain (verbose, costs off) execute mt_q2 (35);
+
+deallocate mt_q2;
+
-- ensure initplan params properly prune partitions
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;