diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/access/hash.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 543d8029491..02ef67c974b 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -230,9 +230,12 @@ typedef HashScanOpaqueData *HashScanOpaque; * * There is no particular upper limit on the size of mapp[], other than * needing to fit into the metapage. (With 8K block size, 1024 bitmaps - * limit us to 256 GB of overflow space...) + * limit us to 256 GB of overflow space...). For smaller block size we + * can not use 1024 bitmaps as it will lead to the meta page data crossing + * the block size boundary. So we use BLCKSZ to determine the maximum number + * of bitmaps. */ -#define HASH_MAX_BITMAPS 1024 +#define HASH_MAX_BITMAPS Min(BLCKSZ / 8, 1024) #define HASH_SPLITPOINT_PHASE_BITS 2 #define HASH_SPLITPOINT_PHASES_PER_GRP (1 << HASH_SPLITPOINT_PHASE_BITS) |