diff options
author | Jeff Davis <jdavis@postgresql.org> | 2020-02-27 10:46:58 -0800 |
---|---|---|
committer | Jeff Davis <jdavis@postgresql.org> | 2020-02-27 11:20:56 -0800 |
commit | c11cb17dc55a6b432dc637491a4491920f9c2770 (patch) | |
tree | 5b05a8aa1194802008fc39dd653c813733fe391c /src/backend/optimizer/util/pathnode.c | |
parent | e537aed61db767745b614600be15cd19bb581330 (diff) | |
download | postgresql-c11cb17dc55a6b432dc637491a4491920f9c2770.tar.gz postgresql-c11cb17dc55a6b432dc637491a4491920f9c2770.zip |
Save calculated transitionSpace in Agg node.
This will be useful in the upcoming Hash Aggregation work to improve
estimates for hash table sizing.
Discussion: https://postgr.es/m/37091115219dd522fd9ed67333ee8ed1b7e09443.camel%40j-davis.com
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index e6d08aede56..d9ce5162116 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -2949,6 +2949,7 @@ create_agg_path(PlannerInfo *root, pathnode->aggstrategy = aggstrategy; pathnode->aggsplit = aggsplit; pathnode->numGroups = numGroups; + pathnode->transitionSpace = aggcosts ? aggcosts->transitionSpace : 0; pathnode->groupClause = groupClause; pathnode->qual = qual; @@ -3036,6 +3037,7 @@ create_groupingsets_path(PlannerInfo *root, pathnode->aggstrategy = aggstrategy; pathnode->rollups = rollups; pathnode->qual = having_qual; + pathnode->transitionSpace = agg_costs ? agg_costs->transitionSpace : 0; Assert(rollups != NIL); Assert(aggstrategy != AGG_PLAIN || list_length(rollups) == 1); |