Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf24cf96

Browse files
committed
Fix test for subplans in force-parallel mode.
We mustn't force parallel mode if the query has any subplans, sinceExecSerializePlan doesn't transmit them to workers. Testingtop_plan->initPlan is inadequate because (1) there might be initPlansattached to lower plan nodes, and (2) non-initPlan subplans don'twork either. There's certainly room for improvement in thoserestrictions, but for the moment that's what we've got.Amit Kapila, per report from Andreas SeltenreichDiscussion: <8737im6pmh.fsf@credativ.de>
1 parentc5f365f commitf24cf96

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-
* forinitPlans, whichrender the plan parallel-unsafe.)
345+
* forsubplans, whichwe 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)

[8]ページ先頭

©2009-2025 Movatter.jp