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

Commit1b2c294

Browse files
committed
Fix HashAgg regression from choosing too many initial buckets.
Diagnosis by Andres.Reported-by: Pavel StehuleDiscussion:https://postgr.es/m/CAFj8pRDLVakD5Aagt3yZeEQeTeEWaS3YE5h8XC3Q3qJ6TYkc2Q%40mail.gmail.comBackpatch-through: 13
1 parent47c7187 commit1b2c294

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎src/backend/executor/nodeAgg.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@
294294
#defineHASHAGG_READ_BUFFER_SIZE BLCKSZ
295295
#defineHASHAGG_WRITE_BUFFER_SIZE BLCKSZ
296296

297-
/* minimum number of initial hash table buckets */
298-
#defineHASHAGG_MIN_BUCKETS 256
299-
300297
/*
301298
* Estimate chunk overhead as a constant 16 bytes. XXX: should this be
302299
* improved?
@@ -1926,9 +1923,8 @@ hash_choose_num_buckets(double hashentrysize, long ngroups, Size memory)
19261923

19271924
if (nbuckets>max_nbuckets)
19281925
nbuckets=max_nbuckets;
1929-
if (nbuckets<HASHAGG_MIN_BUCKETS)
1930-
nbuckets=HASHAGG_MIN_BUCKETS;
1931-
returnnbuckets;
1926+
1927+
returnMax(nbuckets,1);
19321928
}
19331929

19341930
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp