mirror of
https://github.com/postgres/postgres.git
synced 2026-01-13 12:22:55 +03:00
Fix assertion failure when Parallel Append is run serially.
Parallel-aware plan nodes must be prepared to run without parallelism
if it's not possible at execution time for whatever reason. Commit
ab72716778, which introduced Parallel
Append, overlooked this.
Rajkumar Raghuwanshi reported this problem, and I included his test
case in this patch. The code changes are by me.
Discussion: http://postgr.es/m/CAKcux6=WqkUudLg1GLZZ7fc5ScWC1+Y9qD=pAHeqy32WoeJQvw@mail.gmail.com
This commit is contained in:
@@ -49,6 +49,12 @@ explain (costs off)
|
||||
select round(avg(aa)), sum(aa) from a_star a4;
|
||||
reset enable_parallel_append;
|
||||
|
||||
-- Parallel Append that runs serially
|
||||
create or replace function foobar() returns setof text as
|
||||
$$ select 'foo'::varchar union all select 'bar'::varchar $$
|
||||
language sql stable;
|
||||
select foobar() order by 1;
|
||||
|
||||
-- test with leader participation disabled
|
||||
set parallel_leader_participation = off;
|
||||
explain (costs off)
|
||||
|
||||
Reference in New Issue
Block a user