From: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | bms_prev_member won't work correctly if bitmapword is 64-bits |
Date: | 2018-04-22 07:24:47 |
Message-ID: | CAKJS1f_EFJRUM_8ptUpoxE7Wbi-NOg3Pd2kbqiWXcn-XHmsVrA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
bms_prev_member mistakenly has a hardcoded 24 in the function. This
should really be BITS_PER_BITMAPWORD - 8 so that it is properly set to
56 if someone compiles with 64-bit bitmapwords.
The attached fixes this and also adds a test to exercise the function
a bit. [1] indicates there's currently no coverage of this function at
all.
[1] https://coverage.postgresql.org/src/backend/nodes/bitmapset.c.gcov.html
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
0001-Make-bms_prev_member-work-correctly-with-a-64-bit-bi.patch | application/octet-stream | 3.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-04-22 11:11:00 | BGWORKER_BYPASS_ALLOWCONN used nowhere (infra part of on-line checksum switcher) |
Previous Message | Peter Geoghegan | 2018-04-22 01:02:12 | Re: Corrupted btree index on HEAD because of covering indexes |