8000 Change Gather not to use a physical tlist. · home201448/postgres@51d152f · GitHub
[go: up one dir, main page]

Skip to content

Commit 51d152f

Browse files
committed
Change Gather not to use a physical tlist.
This should have been part of the original commit, but was missed. Pushing data between processes is expensive, so we definitely want to project away unneeded columns here, just as we do for other nodes like Sort and Hash that care about the volume of data.
1 parent 30c0c4b commit 51d152f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/optimizer/plan/createplan.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ use_physical_tlist(PlannerInfo *root, RelOptInfo *rel)
558558
* If the plan node immediately above a scan would prefer to get only
559559
* needed Vars and not a physical tlist, it must call this routine to
560560
* undo the decision made by use_physical_tlist(). Currently, Hash, Sort,
561-
* and Material nodes want this, so they don't have to store useless columns.
561+
* Material, and Gather nodes want this, so they don't have to store or
562+
* transfer useless columns.
562563
*/
563564
static void
564565
disuse_physical_tlist(PlannerInfo *root, Plan *plan, Path *path)
@@ -1123,6 +1124,8 @@ create_gather_plan(PlannerInfo *root, GatherPath *best_path)
11231124

11241125
subplan = create_plan_recurse(root, best_path->subpath);
11251126

1127+
disuse_physical_tlist(root, subplan, best_path->subpath);
1128+
11261129
gather_plan = make_gather(subplan->targetlist,
11271130
NIL,
11281131
best_path->num_workers,

0 commit comments

Comments
 (0)
0