Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
Date
Msg-id 19006.1479744058@sss.pgh.pa.us
Whole thread Raw
In response to Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
List pgsql-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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [sqlsmith] Failed assertion in parallel worker in ExecInitSubPlan
Next
From: Vladimir Svedov
Date:
Subject: postgres 9.3 postgres_fdw ::LOG: could not receive data from client: Connection reset by peer