Re: WIP: Upper planner pathification
От | Amit Kapila |
---|---|
Тема | Re: WIP: Upper planner pathification |
Дата | |
Msg-id | CAA4eK1++4wVcTj-+qPsJm4JSfr0Emz6N8diGxtaW6nX-dDcUCA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: WIP: Upper planner pathification (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: WIP: Upper planner pathification
Re: WIP: Upper planner pathification |
Список | pgsql-hackers |
On Fri, Mar 4, 2016 at 11:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> OK, here is a version that I think addresses all of the recent comments:
>
> * Fixed handling of parallel-query fields in new path node types.
> (BTW, I found what seemed to be a couple of pre-existing bugs of
> the same kind, eg create_mergejoin_path was different from the
> other two kinds of join as to setting parallel_degree.)
>
I think the reason for keeping parallel_degree as zero for mergejoin path is that currently it can't participate in parallelism.
>
> OK, here is a version that I think addresses all of the recent comments:
>
> * Fixed handling of parallel-query fields in new path node types.
> (BTW, I found what seemed to be a couple of pre-existing bugs of
> the same kind, eg create_mergejoin_path was different from the
> other two kinds of join as to setting parallel_degree.)
>
I think the reason for keeping parallel_degree as zero for mergejoin path is that currently it can't participate in parallelism.
*************** create_unique_path(PlannerInfo *root, Re
*** 1440,1446 ****
pathnode->path.param_info = subpath-
>param_info;
pathnode->path.parallel_aware = false;
pathnode->path.parallel_safe = subpath->parallel_safe;
!
pathnode->path.parallel_degree = 0;
/*
* Assume the output is unsorted, since we don't necessarily
have pathkeys
--- 1445,1451 ----
pathnode->path.param_info = subpath->param_info;
pathnode-
>path.parallel_aware = false;
pathnode->path.parallel_safe = subpath->parallel_safe;
! pathnode-
>path.parallel_degree = subpath->parallel_degree;
Similar to reason for merge join path, I think this should also be set to 0.
Similarly for LimitPath, parallel_degree should be set to 0.
+ RecursiveUnionPath *
+ create_recursiveunion_path(PlannerInfo *root,
+ RelOptInfo *rel,
+ Path *leftpath,
+ Path *rightpath,
+ PathTarget *target,
+ List *distinctList,
+ int wtParam,
+ double numGroups)
+ {
+ RecursiveUnionPath *pathnode = makeNode(RecursiveUnionPath);
+
+ pathnode->path.pathtype = T_RecursiveUnion;
+ pathnode->path.parent = rel;
+ pathnode->path.pathtarget = target;
+ /* For now, assume we are above any joins, so no parameterization */
+ pathnode->path.param_info = NULL;
+ pathnode->path.parallel_aware = false;
+ pathnode->path.parallel_safe =
+ leftpath->parallel_safe && rightpath->parallel_safe;
I think here we should use rel->consider_parallel to set parallel_safe as is done in create_mergejoin_path.
+ * It's only needed atop a node that doesn't support projection
"needed atop a node", seems unclear to me, typo?
В списке pgsql-hackers по дате отправления: