Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8776c15

Browse files
committed
Fix incorrect tlist generation in create_gather_plan().
This function is written as though Gather doesn't project; but it does.Even if it did not project, though, we must use build_path_tlist to ensurethat the output columns receive correct sortgroupref labeling.Per report from Amit Kapila.
1 parentaa09cd2 commit8776c15

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/backend/optimizer/plan/createplan.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,11 +1360,17 @@ create_gather_plan(PlannerInfo *root, GatherPath *best_path)
13601360
{
13611361
Gather*gather_plan;
13621362
Plan*subplan;
1363+
List*tlist;
13631364

1364-
/* Must insist that all children return the same tlist */
1365+
/*
1366+
* Although the Gather node can project, we prefer to push down such work
1367+
* to its child node, so demand an exact tlist from the child.
1368+
*/
13651369
subplan=create_plan_recurse(root,best_path->subpath,CP_EXACT_TLIST);
13661370

1367-
gather_plan=make_gather(subplan->targetlist,
1371+
tlist=build_path_tlist(root,&best_path->path);
1372+
1373+
gather_plan=make_gather(tlist,
13681374
NIL,
13691375
best_path->path.parallel_degree,
13701376
best_path->single_copy,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp