pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix the overrun in hash index metapage for smaller block sizes. 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix the overrun in hash index metapage for smaller block sizes. @ 2018-09-06 05:01 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2018-09-06 05:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ac27c74def5d8544530b13d5901308a342f072ac Modified Files -------------- src/include/access/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix the overrun in hash index metapage for smaller block sizes. @ 2018-09-06 05:01 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2018-09-06 05:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/916afca45d99c8e736eb45aeec9ef256967bc1e2 Modified Files -------------- src/include/access/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix the overrun in hash index metapage for smaller block sizes. @ 2018-09-06 05:01 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Amit Kapila @ 2018-09-06 05:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/834bce0a5293424d127ab72440b9eacc8841051f Modified Files -------------- src/include/access/hash.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-09-06 05:01 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-09-06 05:01 pgsql: Fix the overrun in hash index metapage for smaller block sizes. Amit Kapila <akapila@postgresql.org> 2018-09-06 05:01 pgsql: Fix the overrun in hash index metapage for smaller block sizes. Amit Kapila <akapila@postgresql.org> 2018-09-06 05:01 pgsql: Fix the overrun in hash index metapage for smaller block sizes. Amit Kapila <akapila@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox