aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 26111327ca1..331acee2814 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -294,9 +294,6 @@
#define HASHAGG_READ_BUFFER_SIZE BLCKSZ
#define HASHAGG_WRITE_BUFFER_SIZE BLCKSZ
-/* minimum number of initial hash table buckets */
-#define HASHAGG_MIN_BUCKETS 256
-
/*
* Estimate chunk overhead as a constant 16 bytes. XXX: should this be
* improved?
@@ -1926,9 +1923,8 @@ hash_choose_num_buckets(double hashentrysize, long ngroups, Size memory)
if (nbuckets > max_nbuckets)
nbuckets = max_nbuckets;
- if (nbuckets < HASHAGG_MIN_BUCKETS)
- nbuckets = HASHAGG_MIN_BUCKETS;
- return nbuckets;
+
+ return Max(nbuckets, 1);
}
/*