Re: Inadequate parallel-safety check for SubPlans
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Noah Misch <noah@leadboat.com>, Robert Haas <robertmhaas@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-04-19T03:39:41Z
Lists: 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
Commits
-
Fix testing of parallel-safety of SubPlans.
- 39151781c8cd 10.0 landed