Remove reltarget_has_non_vars flag.
Tom Lane <tgl@sss.pgh.pa.us>
Remove reltarget_has_non_vars flag. Commit b12fd41c6 added a "reltarget_has_non_vars" field to RelOptInfo, but failed to maintain it accurately. Since its only purpose was to skip calls to has_parallel_hazard() in the simple case where a rel's targetlist is all Vars, and that call is really pretty cheap in that case anyway, it seems like this is just a case of premature optimization. Let's drop the flag and do the calls unconditionally until it's proven that we need more smarts here.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/outfuncs.c | modified | +0 −1 |
| src/backend/optimizer/path/allpaths.c | modified | +3 −6 |
| src/backend/optimizer/util/placeholder.c | modified | +0 −2 |
| src/backend/optimizer/util/relnode.c | modified | +1 −4 |
| src/include/nodes/relation.h | modified | +0 −2 |