Content-Length: 259496 | pFad | http://github.com/postgrespro/postgres/commit/0832f2db68cc43524a240db47d0428cc9525723e

DF Fix latent costing error in create_merge_append_path. · postgrespro/postgres@0832f2d · GitHub
Skip to content

Commit 0832f2d

Browse files
committed
Fix latent costing error in create_merge_append_path.
create_merge_append_path should use the path rowcount it just computed, not rel->tuples, for costing purposes. Those numbers should always be the same at present, but if we ever support parameterized MergeAppend paths (a case this function is otherwise prepared for), the former would be right and the latter wrong. No need for back-patch since the problem is only latent. Ashutosh Bapat Discussion: <CAFjFpRek+cLCnTo24youuGtsq4zRphEB8EUUPjDxZjnL4n4HYQ@mail.gmail.com>
1 parent 13671b4 commit 0832f2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/optimizer/util/pathnode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ create_merge_append_path(PlannerInfo *root,
13331333
cost_merge_append(&pathnode->path, root,
13341334
pathkeys, list_length(subpaths),
13351335
input_startup_cost, input_total_cost,
1336-
rel->tuples);
1336+
pathnode->path.rows);
13371337

13381338
return pathnode;
13391339
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/0832f2db68cc43524a240db47d0428cc9525723e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy