From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Andreas Seltenreich <seltenreich@gmx.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
Date: Mon, 21 Nov 2016 11:00:58 -0500
Message-ID: <19006.1479744058@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA4eK1+0MUZUvMNuO6SLzjEwD2KVWssDL3G=AiBHHQTzxWnm1w@mail.gmail.com>
References: <8737im6pmh.fsf@credativ.de>
<CAA4eK1KHO2bVkeiDuRmruwZs-VqNRmqRmiVcN6PRfW1HpgPrpg@mail.gmail.com>
<CAA4eK1+0MUZUvMNuO6SLzjEwD2KVWssDL3G=AiBHHQTzxWnm1w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Mon, Nov 21, 2016 at 6:10 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> Here instead of checking whether top_plan has initPlan, it should
>> check whether initPlan is present anywhere in plan tree. I think one
>> simple way could be to check *glob->subplans* instead of
>> top_plan->initPlan,
> Patch based on above suggestion is attached with this mail.
I think this is the right fix for the moment, because the proximate cause
of the crash is that ExecSerializePlan doesn't transmit any part of the
PlannedStmt.subplans list, which glob->subplans is the preimage of.
Now, maybe I'm missing something, but it seems to me that ordinary
subplans could be transmitted to workers just fine. The problem with
transmitting initplans is that you'd lose the expectation of single
evaluation. (Even there, it might be okay if they're far enough down
in the plan tree, but I haven't thought about it in detail.) So I'd
rather see us fix ExecSerializePlan to transmit the subplans list
and have some more-restrictive test here. This code would still be
wrong as it stands though.
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, seltenreich@gmx.de
Subject: Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
In-Reply-To: <19006.1479744058@sss.pgh.pa.us>
References: <8737im6pmh.fsf@credativ.de> <CAA4eK1KHO2bVkeiDuRmruwZs-VqNRmqRmiVcN6PRfW1HpgPrpg@mail.gmail.com> <CAA4eK1+0MUZUvMNuO6SLzjEwD2KVWssDL3G=AiBHHQTzxWnm1w@mail.gmail.com> <19006.1479744058@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