diff options
Diffstat (limited to 'src/backend/executor/nodeHash.c')
-rw-r--r-- | src/backend/executor/nodeHash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index c90fe40b3c9..5d0fc77c301 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -500,7 +500,9 @@ ExecChooseHashTableSize(double ntuples, int tupwidth, bool useskew, * Both nbuckets and nbatch must be powers of 2 to make * ExecHashGetBucketAndBatch fast. We already fixed nbatch; now inflate * nbuckets to the next larger power of 2. We also force nbuckets to not - * be real small, by starting the search at 2^10. + * be real small, by starting the search at 2^10. (Note: above we made + * sure that nbuckets is not more than INT_MAX / 2, so this loop cannot + * overflow, nor can the final shift to recalculate nbuckets.) */ i = 10; while ((1 << i) < nbuckets) |