diff options
author | Amit Kapila | 2018-06-20 02:21:42 +0000 |
---|---|---|
committer | Amit Kapila | 2018-06-20 02:21:42 +0000 |
commit | 403318b71f7058ecbfb65bcc7de1eec96cd35d3f (patch) | |
tree | 38b647ac33a5163828f1f6b2581d1976e6689822 /src/test/regress/sql/select_parallel.sql | |
parent | 1c7c317cd9d1e5647454deed11b55dae764c83bf (diff) |
Don't consider parallel append for parallel unsafe paths.
Commit ab72716778 allowed Parallel Append paths to be generated for a
relation that is not parallel safe. Prevent that from happening.
Initial analysis by Tom Lane.
Reported-by: Rajkumar Raghuwanshi
Author: Amit Kapila and Rajkumar Raghuwanshi
Reviewed-by: Amit Khandekar and Robert Haas
Discussion:https://postgr.es/m/CAKcux6=tPJ6nJ08r__nU_pmLQiC0xY15Fn0HvG1Cprsjdd9s_Q@mail.gmail.com
Diffstat (limited to 'src/test/regress/sql/select_parallel.sql')
-rw-r--r-- | src/test/regress/sql/select_parallel.sql | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/regress/sql/select_parallel.sql b/src/test/regress/sql/select_parallel.sql index 7db75b0d220..31045d7f44d 100644 --- a/src/test/regress/sql/select_parallel.sql +++ b/src/test/regress/sql/select_parallel.sql @@ -55,6 +55,15 @@ $$ select 'foo'::varchar union all select 'bar'::varchar $$ language sql stable; select sp_test_func() order by 1; +-- Parallel Append is not to be used when the subpath depends on the outer param +create table part_pa_test(a int, b int) partition by range(a); +create table part_pa_test_p1 partition of part_pa_test for values from (minvalue) to (0); +create table part_pa_test_p2 partition of part_pa_test for values from (0) to (maxvalue); +explain (costs off) + select (select max((select pa1.b from part_pa_test pa1 where pa1.a = pa2.a))) + from part_pa_test pa2; +drop table part_pa_test; + -- test with leader participation disabled set parallel_leader_participation = off; explain (costs off) |