From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Simplify plpgsql's check for simple expressions. |
Date: | 2017-08-16 15:22:29 |
Message-ID: | CA+Tgmoan1cPF+rSPhX8NQ2p1pNPv+1NiqrPi-yA9ft6tyv+78A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Wed, Aug 16, 2017 at 11:03 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Tue, Aug 15, 2017 at 6:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> (In fact, a quick look shows a counterexample: if we pick a MinMaxAgg
>>> path, that's parallel unsafe, but the original query might've been
>>> completely safe.)
>
>> I'm quite confused here. What's parallel-unsafe about a MinMaxAgg?
>> There might be some reason why it's parallel-restricted, but it
>> shouldn't be parallel-unsafe.
>
> Well, it has subplans, so formally I think it's restricted not unsafe
> --- but the parallel_safe marking on constructed paths/plans is only
> safe/not-safe, not a three-way.
True, but when parallel_safe it not set, that means it's not
parallel-safe, so either parallel-restricted or parallel-unsafe. But
if parallelModeOK is true, then it had better be parallel-restricted,
not parallel-unsafe. Which in turn means that it had better be
perfectly safe to run the plan under
EnterParallelMode()/ExitParallelMode(). If it's not, then <original
query> UNION ALL <something that makes a Gather> would blow up.
So I still don't see what's wrong here, other than that the comment is
evidently not half clear enough. I don't think this is the first time
we've been over all this.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2017-08-16 15:56:34 | Re: [COMMITTERS] pgsql: Simplify plpgsql's check for simple expressions. |
Previous Message | Peter Eisentraut | 2017-08-16 15:05:07 | pgsql: Correct representation of foreign tables in information schema |
From | Date | Subject | |
---|---|---|---|
Next Message | Ildus Kurbangaliev | 2017-08-16 15:40:19 | Re: Remove 1MB size limit in tsvector |
Previous Message | Tom Lane | 2017-08-16 15:16:58 | Re: Atomics for heap_parallelscan_nextpage() |