Re: bms_prev_member won't work correctly if bitmapword is 64-bits

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: bms_prev_member won't work correctly if bitmapword is 64-bits
Date: 2018-04-23 15:00:09
Message-ID: c1147149-2969-d6b3-5649-e9416bba9c27@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you, pushed

David Rowley wrote:
> 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
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-04-23 15:13:01 Re: minor fix for CloneRowTriggersToPartition
Previous Message Andres Freund 2018-04-23 14:58:30 Re: wal_consistency_checking reports an inconsistency on master branch