Re: Making empty Bitmapsets always be NULL - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Making empty Bitmapsets always be NULL
Date
Msg-id 2330207.1677809826@sss.pgh.pa.us
Whole thread Raw
In response to Re: Making empty Bitmapsets always be NULL  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Making empty Bitmapsets always be NULL
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I suggest tightening the rule even further so instead of just empty
> sets having to be represented as NULL, the rule should be that sets
> should never contain any trailing zero words, which is effectively a
> superset of the "empty is NULL" rule that you've just changed.

Hmm, I'm not immediately a fan of that, because it'd mean more
interaction with aset.c to change the allocated size of results.
(Is it worth carrying both "allocated words" and "nonzero words"
fields to avoid useless memory-management effort?  Dunno.)

Another point here is that I'm pretty sure that just about all
bitmapsets we deal with are only one or two words, so I'm not
convinced you're going to get any performance win to justify
the added management overhead.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Rework LogicalOutputPluginWriterUpdateProgress