diff options
Diffstat (limited to 'src/backend/optimizer/plan/planner.c')
-rw-r--r-- | src/backend/optimizer/plan/planner.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 10ecc2976e8..65a9b0d802a 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -431,12 +431,10 @@ standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) Gather *gather = makeNode(Gather); /* - * If there are any initPlans attached to the formerly-top plan node, - * move them up to the Gather node; same as we do for Material node in - * materialize_finished_plan. + * Top plan must not have any initPlans, else it shouldn't have been + * marked parallel-safe. */ - gather->plan.initPlan = top_plan->initPlan; - top_plan->initPlan = NIL; + Assert(top_plan->initPlan == NIL); gather->plan.targetlist = top_plan->targetlist; gather->plan.qual = NIL; |