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

Commit3f48294

Browse files
committed
ExecInitAgg: update aggstate->numaggs and ->numtrans earlier.
Functions hash_agg_entry_size() and build_hash_tables() make use ofthose values for memory size estimates.Because this change only affects memory estimates, don't backpatch.Discussion:https://postgr.es/m/7530bd8783b1a78d53a3c70383e38d8da0a5ffe5.camel%40j-davis.com
1 parent32ddfaf commit3f48294

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3379,8 +3379,8 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
33793379
max_aggno=Max(max_aggno,aggref->aggno);
33803380
max_transno=Max(max_transno,aggref->aggtransno);
33813381
}
3382-
numaggs=max_aggno+1;
3383-
numtrans=max_transno+1;
3382+
aggstate->numaggs=numaggs=max_aggno+1;
3383+
aggstate->numtrans=numtrans=max_transno+1;
33843384

33853385
/*
33863386
* For each phase, prepare grouping set data and fmgr lookup data for
@@ -3943,13 +3943,6 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
39433943
ReleaseSysCache(aggTuple);
39443944
}
39453945

3946-
/*
3947-
* Update aggstate->numaggs to be the number of unique aggregates found.
3948-
* Also set numstates to the number of unique transition states found.
3949-
*/
3950-
aggstate->numaggs=numaggs;
3951-
aggstate->numtrans=numtrans;
3952-
39533946
/*
39543947
* Last, check whether any more aggregates got added onto the node while
39553948
* we processed the expressions for the aggregate arguments (including not

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp