Skip to content

Commit 61fd218

Browse files
committed
Fix minor thinko in pathification code.
I passed the wrong "root" struct to create_pathtarget in build_minmax_path. Since the subroot is a clone of the outer root, this would not cause any serious problems, but it would waste some cycles because set_pathtarget_cost_width would not have access to Var width estimates set up while running query_planner on the subroot.
1 parent e66197f commit 61fd218

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/optimizer/plan/planagg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo,
465465
* cheapest path.)
466466
*/
467467
sorted_path = apply_projection_to_path(subroot, final_rel, sorted_path,
468-
create_pathtarget(root, tlist));
468+
create_pathtarget(subroot, tlist));
469469

470470
/*
471471
* Determine cost to get just the first row of the presorted path.

0 commit comments

Comments
 (0)