1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

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.
This commit is contained in:
Tom Lane
2016-06-10 16:20:03 -04:00
parent 2f153ddfdd
commit 3303ea1a32
5 changed files with 4 additions and 15 deletions

View File

@@ -393,7 +393,6 @@ add_placeholders_to_base_rels(PlannerInfo *root)
rel->reltarget->exprs = lappend(rel->reltarget->exprs,
copyObject(phinfo->ph_var));
rel->reltarget_has_non_vars = true;
/* reltarget's cost and width fields will be updated later */
}
}
@@ -428,7 +427,6 @@ add_placeholders_to_joinrel(PlannerInfo *root, RelOptInfo *joinrel,
/* Yup, add it to the output */
joinrel->reltarget->exprs = lappend(joinrel->reltarget->exprs,
phinfo->ph_var);
joinrel->reltarget_has_non_vars = true;
joinrel->reltarget->width += phinfo->ph_width;
/*