* If the plan node immediately above a scan would prefer to get only
* needed Vars and not a physical tlist, it must call this routine to
* undo the decision made by use_physical_tlist(). Currently, Hash, Sort,
- * and Material nodes want this, so they don't have to store useless columns.
+ * Material, and Gather nodes want this, so they don't have to store or
+ * transfer useless columns.
*/
static void
disuse_physical_tlist(PlannerInfo *root, Plan *plan, Path *path)
subplan = create_plan_recurse(root, best_path->subpath);
+ disuse_physical_tlist(root, subplan, best_path->subpath);
+
gather_plan = make_gather(subplan->targetlist,
NIL,
best_path->num_workers,