Re: Inadequate parallel-safety check for SubPlans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inadequate parallel-safety check for SubPlans
Date: 2017-04-19 03:39:41
Message-ID: 9380.1492573181@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
> On Wed, Apr 19, 2017 at 1:27 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think leaving that sort of thing out is just creating a latent bug
>> that is certain to bite you later. It's true that as long as the args
>> list contains only Vars, it would never be parallel-unsafe --- but
>> primnodes.h is pretty clear that one shouldn't assume that it will
>> stay that way.

> Sure, but the point I was trying to make was whenever subplan has
> args, I think it won't be parallel-safe as those args are used to pass
> params.

Right now, yes, but surely we're going to be trying to relax that sometime
soon. And at that point it would be a latent bug for this function to
not recurse into the args list. Whatever the restrictions are on the
tree as a whole, they'll apply to that subtree too.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2017-04-19 03:43:14 Fixup some misusage of appendStringInfo and friends
Previous Message David Rowley 2017-04-19 03:36:19 Re: Should pg_current_wal_location() become pg_current_wal_lsn()