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

Commit564ce62

Browse files
Rename "hash_mem" local variable.
The term "hash_mem" will take on new significance when pending work toadd a new hash_mem_multiplier GUC is committed. Rename a local variablethat happens to have been called hash_mem now to avoid confusion.
1 parent1e0dfd1 commit564ce62

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ static void
18961896
hash_agg_update_metrics(AggState*aggstate,boolfrom_tape,intnpartitions)
18971897
{
18981898
Sizemeta_mem;
1899-
Sizehash_mem;
1899+
Sizehashkey_mem;
19001900
Sizebuffer_mem;
19011901
Sizetotal_mem;
19021902

@@ -1908,15 +1908,15 @@ hash_agg_update_metrics(AggState *aggstate, bool from_tape, int npartitions)
19081908
meta_mem=MemoryContextMemAllocated(aggstate->hash_metacxt, true);
19091909

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

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

19181918
/* update peak mem */
1919-
total_mem=meta_mem+hash_mem+buffer_mem;
1919+
total_mem=meta_mem+hashkey_mem+buffer_mem;
19201920
if (total_mem>aggstate->hash_mem_peak)
19211921
aggstate->hash_mem_peak=total_mem;
19221922

@@ -1934,7 +1934,7 @@ hash_agg_update_metrics(AggState *aggstate, bool from_tape, int npartitions)
19341934
{
19351935
aggstate->hashentrysize=
19361936
sizeof(TupleHashEntryData)+
1937-
(hash_mem / (double)aggstate->hash_ngroups_current);
1937+
(hashkey_mem / (double)aggstate->hash_ngroups_current);
19381938
}
19391939
}
19401940

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp