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

Commitcdd7bd6

Browse files
Rename another "hash_mem" local variable.
Missed by my commit564ce62.Backpatch: 13-, where disk-based hash aggregation was introduced.
1 parentb6c15e7 commitcdd7bd6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,15 +1839,15 @@ hash_agg_check_limits(AggState *aggstate)
18391839
uint64ngroups=aggstate->hash_ngroups_current;
18401840
Sizemeta_mem=MemoryContextMemAllocated(aggstate->hash_metacxt,
18411841
true);
1842-
Sizehash_mem=MemoryContextMemAllocated(aggstate->hashcontext->ecxt_per_tuple_memory,
1843-
true);
1842+
Sizehashkey_mem=MemoryContextMemAllocated(aggstate->hashcontext->ecxt_per_tuple_memory,
1843+
true);
18441844

18451845
/*
18461846
* Don't spill unless there's at least one group in the hash table so we
18471847
* can be sure to make progress even in edge cases.
18481848
*/
18491849
if (aggstate->hash_ngroups_current>0&&
1850-
(meta_mem+hash_mem>aggstate->hash_mem_limit||
1850+
(meta_mem+hashkey_mem>aggstate->hash_mem_limit||
18511851
ngroups>aggstate->hash_ngroups_limit))
18521852
{
18531853
hash_agg_enter_spill_mode(aggstate);
@@ -1898,7 +1898,7 @@ static void
18981898
hash_agg_update_metrics(AggState*aggstate,boolfrom_tape,intnpartitions)
18991899
{
19001900
Sizemeta_mem;
1901-
Sizehash_mem;
1901+
Sizehashkey_mem;
19021902
Sizebuffer_mem;
19031903
Sizetotal_mem;
19041904

@@ -1910,15 +1910,15 @@ hash_agg_update_metrics(AggState *aggstate, bool from_tape, int npartitions)
19101910
meta_mem=MemoryContextMemAllocated(aggstate->hash_metacxt, true);
19111911

19121912
/* memory for the group keys and transition states */
1913-
hash_mem=MemoryContextMemAllocated(aggstate->hashcontext->ecxt_per_tuple_memory, true);
1913+
hashkey_mem=MemoryContextMemAllocated(aggstate->hashcontext->ecxt_per_tuple_memory, true);
19141914

19151915
/* memory for read/write tape buffers, if spilled */
19161916
buffer_mem=npartitions*HASHAGG_WRITE_BUFFER_SIZE;
19171917
if (from_tape)
19181918
buffer_mem+=HASHAGG_READ_BUFFER_SIZE;
19191919

19201920
/* update peak mem */
1921-
total_mem=meta_mem+hash_mem+buffer_mem;
1921+
total_mem=meta_mem+hashkey_mem+buffer_mem;
19221922
if (total_mem>aggstate->hash_mem_peak)
19231923
aggstate->hash_mem_peak=total_mem;
19241924

@@ -1936,7 +1936,7 @@ hash_agg_update_metrics(AggState *aggstate, bool from_tape, int npartitions)
19361936
{
19371937
aggstate->hashentrysize=
19381938
sizeof(TupleHashEntryData)+
1939-
(hash_mem / (double)aggstate->hash_ngroups_current);
1939+
(hashkey_mem / (double)aggstate->hash_ngroups_current);
19401940
}
19411941
}
19421942

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp