Re: [HACKERS] Inadequate parallel-safety check for SubPlans - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Inadequate parallel-safety check for SubPlans
Date
Msg-id 9380.1492573181@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Inadequate parallel-safety check for SubPlans  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Wed, Apr 19, 2017 at 1:27 AM, Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [HACKERS] Should pg_current_wal_location() become pg_current_wal_lsn()
Next
From: David Rowley
Date:
Subject: [HACKERS] Fixup some misusage of appendStringInfo and friends