From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: fixing subplan/subquery confusion |
Date: | 2016-06-28 11:52:06 |
Message-ID: | CAA4eK1+2_K_+jkzNcYckER+UmgDH-=XDWs=qF3UZBomswBO__A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 28, 2016 at 8:25 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>> I had couple of questions [1] related to that patch. See if you find
>> those as relevant?
>
> I do not think those cases are directly relevant: you're talking about
> appendrels not single, unflattened RTE_SUBQUERY rels.
>
Right, but still I think we shouldn't leave the appendrel case unattended.
> In the subquery case, my view of how it ought to work is that Paths coming
> up from the subquery would be marked as not-parallel-safe if they contain
> references to unsafe functions. It might be that that doesn't happen for
> free, but my guess is that it would already work that way given a change
> similar to what I proposed.
>
This makes sense to me.
> In the appendrel case, I tend to agree that the easiest solution is to
> scan all the children of the appendrel and just mark the whole thing as
> not consider_parallel if any of them have unsafe functions.
>
Thats what I had in mind as well, but not sure which is the best place
to set it. Shall we do it in set_append_rel_size() after setting the
size of each relation (after foreach loop) or is it better to do it in
set_append_rel_pathlist(). Is it better to do it as a separate patch
or to enhance your patch for this change? If you are okay, I can
update the patch or write a new one based on what is preferred?
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2016-06-28 12:20:50 | Re: Postgres_fdw join pushdown - wrong results with whole-row reference |
Previous Message | Masahiko Sawada | 2016-06-28 11:06:14 | Re: Reviewing freeze map code |