Re: pgsql: Don't generate parallel paths for rels with parallel-restricted

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <rhaas(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Don't generate parallel paths for rels with parallel-restricted
Date: 2016-06-09 17:02:09
Message-ID: 5569.1465491729@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas <rhaas(at)postgresql(dot)org> writes:
> Don't generate parallel paths for rels with parallel-restricted outputs.

Surely this bit is wrong on its face:

@@ -971,6 +980,7 @@ set_append_rel_size(PlannerInfo *root, RelOptInfo *rel,
adjust_appendrel_attrs(root,
(Node *) rel->reltarget->exprs,
appinfo);
+ childrel->reltarget_has_non_vars = rel->reltarget_has_non_vars;

/*
* We have to make child entries in the EquivalenceClass data

The entire point of what we are doing here is that Vars might get replaced
with things that are not Vars. See the comment a dozen lines above.

More generally, if we need such a flag (which I doubt really), perhaps
it should be part of PathTarget rather than expecting that it can
successfully be maintained separately?

It seems like the only reason that we would need such a flag is that
applying has_parallel_hazard() to a Var is a bit expensive thanks to
the typeid_is_temp() test --- but if you ask me, that test is stupid
and should be removed. What's the argument for supposing that a temp
table's rowtype is any more mutable intra-query than any other rowtype?

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-06-09 17:26:41 Re: [COMMITTERS] pgsql: Don't generate parallel paths for rels with parallel-restricted
Previous Message Robert Haas 2016-06-09 16:43:49 pgsql: Don't generate parallel paths for rels with parallel-restricted

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-09 17:07:59 Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116
Previous Message Robert Haas 2016-06-09 17:01:47 Re: parallel workers and client encoding