Skip to content

Commit 22864f6

Browse files
committed
Put back regression test case in a more robust form.
This undoes my hurried commit 776a2c8, 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
1 parent 1a3efa1 commit 22864f6

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/test/regress/expected/partition_prune.out

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3161,6 +3161,19 @@ execute mt_q1(35);
31613161
(0 rows)
31623162

31633163
deallocate mt_q1;
3164+
prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
3165+
-- Ensure output list looks sane when the MergeAppend has no subplans.
3166+
explain (verbose, costs off) execute mt_q2 (35);
3167+
QUERY PLAN
3168+
--------------------------------
3169+
Limit
3170+
Output: ma_test.a, ma_test.b
3171+
-> Merge Append
3172+
Sort Key: ma_test.b
3173+
Subplans Removed: 3
3174+
(5 rows)
3175+
3176+
deallocate mt_q2;
31643177
-- ensure initplan params properly prune partitions
31653178
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;
31663179
QUERY PLAN

src/test/regress/sql/partition_prune.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,13 @@ execute mt_q1(35);
838838

839839
deallocate mt_q1;
840840

841+
prepare mt_q2 (int) as select * from ma_test where a >= $1 order by b limit 1;
842+
843+
-- Ensure output list looks sane when the MergeAppend has no subplans.
844+
explain (verbose, costs off) execute mt_q2 (35);
845+
846+
deallocate mt_q2;
847+
841848
-- ensure initplan params properly prune partitions
842849
explain (analyze, costs off, summary off, timing off) select * from ma_test where a >= (select min(b) from ma_test_p2) order by b;
843850

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy