Skip to content

Commit ef90986

Browse files
author
Commitfest Bot
committed
[CF 5704] v3 - adjust the place of list_copy() call to reduce the overhead of function call and memory copies.
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5704 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAHewXNnHBOO9NEa=NBDYOrwZL4oHu2NOcTYvqyNyWEswo8f5OQ@mail.gmail.com Author(s): Tender Wang
2 parents 1e9b514 + 41f12b0 commit ef90986

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/utils/adt/selfuncs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3798,7 +3798,7 @@ estimate_multivariate_bucketsize(PlannerInfo *root, RelOptInfo *inner,
37983798
List *hashclauses,
37993799
Selectivity *innerbucketsize)
38003800
{
3801-
List *clauses = list_copy(hashclauses);
3801+
List *clauses;
38023802
List *otherclauses = NIL;
38033803
double ndistinct = 1.0;
38043804

@@ -3810,6 +3810,7 @@ estimate_multivariate_bucketsize(PlannerInfo *root, RelOptInfo *inner,
38103810
*/
38113811
return hashclauses;
38123812

3813+
clauses = list_copy(hashclauses);
38133814
while (clauses != NIL)
38143815
{
38153816
ListCell *lc;

0 commit comments

Comments
 (0)