Re: [sqlsmith] Failed assertion in parallel worker (ExecInitSubPlan)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [sqlsmith] Failed assertion in parallel worker (ExecInitSubPlan)
Date: 2016-05-12 15:39:43
Message-ID: CA+Tgmoah1Zzx1VrcAGfg3+6K9G_SLTqbY4CirLRccb2EpybocA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 12, 2016 at 7:46 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On further analysis, I think I know what is going on in the original bug
> report. We add the Vars (build_base_rel_tlists) and PlaceholderVars
> (add_placeholders_to_base_rels()) to each relations (RelOptInfo) target
> during qurey_planner and the Subplans are added as PlaceHolderVars in target
> expressions. Now while considering whether a particular rel can be parallel
> in set_rel_consider_parallel(), we don't check the target expressions to
> allow the relation for parallelism. I think we can prohibit the relation to
> be considered for parallelism if it's target expressions contain any
> parallel restricted clause. Fix on those lines is attached with this mail.
>
> Thanks to Dilip Kumar for helping me in narrowing down this particular
> problem. We were not able to generate the exact test, but I think the above
> theory is sufficient to prove that it can cause a problem as seen in the
> original bug report.

I could be wrong, but I thought that the target list for an expression
would always contain only Vars at this stage. Non-default tlists get
injected at the end of scan/join planning. Am I wrong?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sherrylyn Branchaw 2016-05-12 15:46:01 Re: Change error code for hstore syntax error
Previous Message Robert Haas 2016-05-12 15:37:32 Re: [COMMITTERS] pgsql: Add TAP tests for pg_dump