public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Greg Burd <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Chao Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Add bms_offset_members() function for bitshifting Bitmapsets
Date: Tue, 21 Apr 2026 13:40:17 +1200
Message-ID: <CAApHDvqPRUqTVU0=Ewm38UKWOV5Ak1mQXg=+L98Mm9CVpyAmLQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAApHDvq=eEdw2Qp+aSzSOtTSe+h0fnVQ55CcTNqBkLDYiRZmxw@mail.gmail.com>
	<[email protected]>
	<CAApHDvoALVPgVSCuGdAfNUbxx_NacnAd0nuj8Hi=_-61AEqzaQ@mail.gmail.com>
	<[email protected]>
	<CAApHDvq4_WDfTaWX6nHU8TV+no+aD1zjLphza685Ek7=xgGzew@mail.gmail.com>
	<[email protected]>
	<CAApHDvp=fhr8ksuGyXkwYPXQpYvJ38YMhHvx6JmdD39cAvNRhw@mail.gmail.com>
	<CAApHDvrp6JwOVH3VwMB=YL3p97F5_0hKJc7J8zHRKuyhKru1dA@mail.gmail.com>
	<[email protected]>
	<CAApHDvqOgtX2MqaPmPmPET7=ySszzuoP3MLSUbWZit_V30VBLg@mail.gmail.com>
	<[email protected]>

On Tue, 21 Apr 2026 at 02:55, Greg Burd <[email protected]> wrote:
> Were you planning on writing the optimized non-copy version as well?  I don't think it is strictly necessary, more a curiosity.
>
> bms_offset_members() -> new bms, might repalloc() replaces existing loops you've found
> bms_shift_members() -> bms is modified in place and fits your new use case a bit better

Not at this stage. The v1 patch did modify the set in-place, so the
code is there if we ever need it. I didn't find any need for it in our
current code. The selective tuple deforming patch I'm working on could
use it, but I doubt it's worth the trouble for 1 caller. It's just for
something that happens during create_plan(), so 1 more allocation in
that code likely isn't going to be noticed.

David





view thread (15+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Add bms_offset_members() function for bitshifting Bitmapsets
  In-Reply-To: <CAApHDvqPRUqTVU0=Ewm38UKWOV5Ak1mQXg=+L98Mm9CVpyAmLQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox