Re: Making empty Bitmapsets always be NULL
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Yuya Watari <watari.yuya@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Date: 2023-07-03T00:09:48Z
Lists: pgsql-hackers
Attachments
- remove_trailing_zero_words_from_bitmapsets_v5.patch (text/plain) patch v5
On Mon, 3 Jul 2023 at 09:27, David Rowley <dgrowleyml@gmail.com> wrote: > If nobody else wants to take a look, then I plan to push the v4 + the > asserts in the next day or so. Here's the patch which includes those Asserts. I also made some small tweaks to a comment. I understand that Tom thought that the Asserts were a step too far in [1], but per the bugs found in [2], I think having them is worthwhile. In the attached, I only added Asserts to the locations where the code relies on there being no trailing zero words. I didn't include them in places like bms_copy() since nothing there would do the wrong thing if there were trailing zero words. David [1] https://postgr.es/m/2686153.1677881312@sss.pgh.pa.us [2] https://postgr.es/m/CAJ2pMkYcKHFBD_OMUSVyhYSQU0-j9T6NZ0pL6pwbZsUCohWc7Q@mail.gmail.com
Commits
-
Remove trailing zero words from Bitmapsets
- a8c09daa8bb1 17.0 landed
-
Remove local optimizations of empty Bitmapsets into null pointers.
- 6b661b01f48b 16.0 landed
-
Require empty Bitmapsets to be represented as NULL.
- 00b41463c216 16.0 landed
-
Mop up some undue familiarity with the innards of Bitmapsets.
- 141225b2518f 16.0 landed
-
Remove bms_first_member().
- 462bb7f12851 16.0 landed