Content-Length: 268916 | pFad | http://github.com/postgrespro/postgres/commit/f24cf960d7ae3503e21fcb59dca652575619d9d4

32 Fix test for subplans in force-parallel mode. · postgrespro/postgres@f24cf96 · GitHub
Skip to content

Commit f24cf96

Browse files
committed
Fix test for subplans in force-parallel mode.
We mustn't force parallel mode if the query has any subplans, since ExecSerializePlan doesn't transmit them to workers. Testing top_plan->initPlan is inadequate because (1) there might be initPlans attached to lower plan nodes, and (2) non-initPlan subplans don't work either. There's certainly room for improvement in those restrictions, but for the moment that's what we've got. Amit Kapila, per report from Andreas Seltenreich Discussion: <8737im6pmh.fsf@credativ.de>
1 parent c5f365f commit f24cf96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,11 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
342342
* actually a safe thing to do. (Note: we assume adding a Material node
343343
* above did not change the parallel safety of the plan, so we can still
344344
* rely on best_path->parallel_safe. However, that flag doesn't account
345-
* for initPlans, which render the plan parallel-unsafe.)
345+
* for subplans, which we are unable to transmit to workers presently.)
346346
*/
347347
if (force_parallel_mode != FORCE_PARALLEL_OFF &&
348348
best_path->parallel_safe &&
349-
top_plan->initPlan == NIL)
349+
glob->subplans == NIL)
350350
{
351351
Gather *gather = makeNode(Gather);
352352

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f24cf960d7ae3503e21fcb59dca652575619d9d4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy