On Thu, Feb 12, 2015 at 10:07 PM, Robert Haas <
robertmhaas@gmail.com> wrote:
>
> On Thu, Feb 12, 2015 at 6:40 AM, Amit Kapila <
amit.kapila16@gmail.com> wrote:
> > If we have to go this way, then isn't it better to evaluate the same
> > when we are trying to create parallel path (something like in the
> > parallel_seq scan patch - create_parallelscan_paths())?
>
> Probably not, because many queries will scan multiple relations, and
> we want to do all of this work just once per query.
By this, do you mean to say that if there is any parallel-unsafe
expression (function call) in query, then we won't parallelize any
part of query, if so why is that mandatory?
Can't we parallelize scan on a particular relation if all the expressions
in which that relation is involved are parallel-safe
> Also, when
> somebody adds another parallel node (e.g. parallel hash join) that
> will need this same information.
>
I think we should be able to handle this even if we have per relation
information (something like don't parallelize a node/path if any lower
node is not parallel)