aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/dynloader/linux.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2018-09-06 09:27:19 +0530
committerAmit Kapila <akapila@postgresql.org>2018-09-06 09:27:19 +0530
commitac27c74def5d8544530b13d5901308a342f072ac (patch)
treedc7b965a9ce68c9a3f5c22823e7333d9ccb50fa0 /src/backend/port/dynloader/linux.c
parentbe54b3777ff189e79661d8746d3f25b0564393d2 (diff)
downloadpostgresql-ac27c74def5d8544530b13d5901308a342f072ac.tar.gz
postgresql-ac27c74def5d8544530b13d5901308a342f072ac.zip
Fix the overrun in hash index metapage for smaller block sizes.
The commit 620b49a1 changed the value of HASH_MAX_BITMAPS with the intent to allow many non-unique values in hash indexes without worrying to reach the limit of the number of overflow pages. At that time, this didn't occur to us that it can overrun the block for smaller block sizes. Choose the value of HASH_MAX_BITMAPS based on BLCKSZ such that it gives the same answer as now for the cases where the overrun doesn't occur, and some other sufficiently-value for the cases where an overrun currently does occur. This allows us not to change the behavior in any case that currently works, so there's really no reason for a HASH_VERSION bump. Author: Dilip Kumar Reviewed-by: Amit Kapila Backpatch-through: 10 Discussion: https://postgr.es/m/CAA4eK1LtF4VmU4mx_+i72ff1MdNZ8XaJMGkt2HV8+uSWcn8t4A@mail.gmail.com
Diffstat (limited to 'src/backend/port/dynloader/linux.c')
0 files changed, 0 insertions, 0 deletions