From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: Upper planner pathification |
Date: | 2016-03-05 11:21:14 |
Message-ID: | CAA4eK1++4wVcTj-+qPsJm4JSfr0Emz6N8diGxtaW6nX-dDcUCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 4, 2016 at 11:31 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.
*************** 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?
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2016-03-05 11:36:23 | Re: WIP: Upper planner pathification |
Previous Message | Amit Langote | 2016-03-05 07:41:29 | Re: [PROPOSAL] VACUUM Progress Checker. |