mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 17:37:07 +08:00
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
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user