OSDN Git Service

Add a regression about forcing gather-merge.
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Wed, 4 Oct 2017 00:46:43 +0000 (09:46 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Wed, 4 Oct 2017 00:46:43 +0000 (09:46 +0900)
The previous commit is said to allow enforce gather merge but no
regression for that is not included. This adds that.

expected/ut-W.out
sql/ut-W.sql

index bb74d27..ac208ef 100644 (file)
@@ -65,6 +65,23 @@ error hint:
    ->  Parallel Seq Scan on t1
 (3 rows)
 
+/*+Parallel(t1 4 hard) */ /* to be gather merge*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1 ORDER BY s1.t1.c1 LIMIT 4;
+LOG:  pg_hint_plan:
+used hint:
+Parallel(t1 4 hard)
+not used hint:
+duplication hint:
+error hint:
+
+                    QUERY PLAN                     
+---------------------------------------------------
+ Limit
+   ->  Gather Merge
+         Workers Planned: 4
+         ->  Parallel Index Scan using t1_i1 on t1
+(4 rows)
+
 -- Queries on inheritance tables
 SET parallel_setup_cost to 0;
 SET parallel_tuple_cost to 0;
index 199b607..755d8f1 100644 (file)
@@ -26,6 +26,9 @@ EXPLAIN (COSTS false) SELECT * FROM s1.t1;
 /*+Parallel(t1 8 hard)*/
 EXPLAIN (COSTS false) SELECT * FROM s1.t1;
 
+/*+Parallel(t1 4 hard) */ /* to be gather merge*/
+EXPLAIN (COSTS false) SELECT * FROM s1.t1 ORDER BY s1.t1.c1 LIMIT 4;
+
 -- Queries on inheritance tables
 SET parallel_setup_cost to 0;
 SET parallel_tuple_cost to 0;