From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Don't generate parallel paths for rels with parallel-restricted
Date: Fri, 10 Jun 2016 10:50:36 -0400
Message-ID: <24051.1465570236@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1JY5jK_WmHFX2xYXHD9atGD3C3vYpwdZnOGdoY0oy3Yzw@mail.gmail.com>
References: <E1bB33d-0003Gv-VZ@gemulon.postgresql.org>
<5569.1465491729@sss.pgh.pa.us>
<CA+TgmoaxGxKL+73+DxB2b8Q2gKYeVmtSxQ3jW6P9pKGiv5_jjA@mail.gmail.com>
<7106.1465494284@sss.pgh.pa.us>
<CA+TgmoZiC-U3Bce+gR6CJhPjQHyj-1MiPenNa54BQENC-SsQeg@mail.gmail.com>
<7992.1465495683@sss.pgh.pa.us>
<CAA4eK1JY5jK_WmHFX2xYXHD9atGD3C3vYpwdZnOGdoY0oy3Yzw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Thu, Jun 9, 2016 at 11:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> Could you answer my question about whether adjust_appendrel_attrs()
>>> might translate Vars into non-Vars?
>> Yes, absolutely.
> Isn't this true only for UNION ALL cases and not for inheritance child
> relations (at least that is what seems to be mentioned in comments
> for translated_vars in AppendRelInfo)?
Correct.
> If that is right, then I think
> there shouldn't be a problem w.r.t parallel plans even if
> adjust_appendrel_attrs() translate Vars into non-Vars, because for UNION
> ALL it seems parent rels rtekind is RTE_SUBQUERY and we consider such rels
> as parallel unsafe (see set_rel_consider_parallel()).
Hm, that would explain why you haven't been able to exhibit a bug on HEAD
as it stands; but it doesn't make the code any less broken on its own
terms, or any less of a risk for future bugs when we try to relax the
no-subqueries restriction.
I am still of the opinion that reltarget_has_non_vars is simply a bad
idea. It's wrong as-committed, it will be a permanent maintenance hazard,
and there is no evidence that it saves anything meaningful even as the
code stood yesterday, let alone after cae1c788b. I think we should just
remove it and allow those has_parallel_hazard calls to occur
unconditionally, and will go do that unless I hear some really good
argument to the contrary.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Don't generate parallel paths for rels with parallel-restricted
In-Reply-To: <24051.1465570236@sss.pgh.pa.us>
References: <E1bB33d-0003Gv-VZ@gemulon.postgresql.org> <5569.1465491729@sss.pgh.pa.us> <CA+TgmoaxGxKL+73+DxB2b8Q2gKYeVmtSxQ3jW6P9pKGiv5_jjA@mail.gmail.com> <7106.1465494284@sss.pgh.pa.us> <CA+TgmoZiC-U3Bce+gR6CJhPjQHyj-1MiPenNa54BQENC-SsQeg@mail.gmail.com> <7992.1465495683@sss.pgh.pa.us> <CAA4eK1JY5jK_WmHFX2xYXHD9atGD3C3vYpwdZnOGdoY0oy3Yzw@mail.gmail.com> <24051.1465570236@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox