Re: Making empty Bitmapsets always be NULL

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Yuya Watari <watari(dot)yuya(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Making empty Bitmapsets always be NULL
Date: 2023-07-03 00:09:48
Message-ID: CAApHDvqaODTC-G3Ogp+1dBh=KtBi1_E8tHBu7JbVUTodQZS_sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 3 Jul 2023 at 09:27, David Rowley <dgrowleyml(at)gmail(dot)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

Attachment Content-Type Size
remove_trailing_zero_words_from_bitmapsets_v5.patch text/plain 17.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-07-03 00:50:49 Re: Remove WindowClause PARTITION BY items belonging to redundant pathkeys
Previous Message Yurii Rashkovskii 2023-07-02 23:37:52 Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name