diff options
author | Andres Freund <andres@anarazel.de> | 2018-03-01 16:25:46 -0800 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2018-03-01 16:25:46 -0800 |
commit | 17b340abf83d1b5f67808c45c63b9e0439569cef (patch) | |
tree | 3234e6884cdfd2bc03ea603d7053c52715ba4537 /src/backend/lib | |
parent | 07c6e5163e1f4ae12a3a6478788dd969f8f38cc9 (diff) | |
download | postgresql-17b340abf83d1b5f67808c45c63b9e0439569cef.tar.gz postgresql-17b340abf83d1b5f67808c45c63b9e0439569cef.zip |
Minor clean-up in dshash.{c,h}.
For consistency with other code that deals in numbers of buckets, the
macro BUCKETS_PER_PARTITION should produce a value of type size_t.
Also, fix a mention of an obsolete proposed name for dshash.c that
appeared in a comment.
Author: Thomas Munro, based on an observation from Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1%2BBOp5aaW3aHEkg5Bptf8Ga_BkBnmA-%3DXcAXShs0yCiYQ%40mail.gmail.com
Diffstat (limited to 'src/backend/lib')
-rw-r--r-- | src/backend/lib/dshash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/lib/dshash.c b/src/backend/lib/dshash.c index b1973d4bfbc..b46f7c4cfd0 100644 --- a/src/backend/lib/dshash.c +++ b/src/backend/lib/dshash.c @@ -129,7 +129,7 @@ struct dshash_table /* How many buckets are there in each partition at a given size? */ #define BUCKETS_PER_PARTITION(size_log2) \ - (UINT64CONST(1) << NUM_SPLITS(size_log2)) + (((size_t) 1) << NUM_SPLITS(size_log2)) /* Max entries before we need to grow. Half + quarter = 75% load factor. */ #define MAX_COUNT_PER_PARTITION(hash_table) \ |