public inbox for [email protected]
help / color / mirror / Atom feedFrom: David Rowley <[email protected]>
To: [email protected]
Subject: pgsql: Introduce bms_offset_members() function
Date: Wed, 08 Jul 2026 13:12:57 +0000
Message-ID: <[email protected]> (raw)
Introduce bms_offset_members() function
Effectively, a function to bitshift members by the specified number of
bits. We have various fragments of code doing this manually with a
bms_next_member() -> bms_add_member() loop. We can do this more
efficiently in terms of CPU and memory allocation by making a new
Bitmapset and bitshifting in the words of the old set to populate it.
Author: David Rowley <[email protected]>
Reviewed-by: Chao Li <[email protected]>
Reviewed-by: Greg Burd <[email protected]>
Discussion: https://postgr.es/m/CAApHDvq=eEdw2Qp+aSzSOtTSe+h0fnVQ55CcTNqBkLDYiRZmxw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bb7ded1eebed708865d9bb0a3513c7ed3afe7065
Modified Files
--------------
src/backend/nodes/bitmapset.c | 135 +++++++++++++++++++++
src/backend/optimizer/plan/setrefs.c | 10 +-
src/backend/optimizer/prep/prepjointree.c | 30 ++---
src/backend/rewrite/rewriteManip.c | 25 +---
src/backend/statistics/extended_stats.c | 12 +-
src/include/nodes/bitmapset.h | 1 +
.../test_bitmapset/expected/test_bitmapset.out | 81 +++++++++++++
.../modules/test_bitmapset/sql/test_bitmapset.sql | 23 ++++
.../modules/test_bitmapset/test_bitmapset--1.0.sql | 8 ++
src/test/modules/test_bitmapset/test_bitmapset.c | 101 ++++++++++++++-
10 files changed, 374 insertions(+), 52 deletions(-)
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]
Subject: Re: pgsql: Introduce bms_offset_members() function
In-Reply-To: <[email protected]>
* 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