pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Update nbits_set in brin_bloom_union
Date: Sun, 14 Apr 2024 16:17:35 +0000
Message-ID: <E1rw2Xu-0022SP-Hq@gemulon.postgresql.org> (raw)

Update nbits_set in brin_bloom_union

Properly update the number of bits set in the bitmap after merging the
filters in brin_bloom_union.

This is mostly harmless, as the counter is used only in the output
function, which means pageinspect may show incorrect information about
the BRIN summary. The counter does not affect correctness.

Discovered while adding a regression test comparing indexes built with
and without parallelism. The parallel index builds exercise the union
procedure when merging results from workers, which is otherwise very
hard to do in a test. Which is why this went unnoticed until now.

Backpatch through 14, where the BRIN bloom opclasses were introduced.

Backpatch-through: 14
Discussion: https://postgr.es/m/1df00a66-db5a-4e66-809a-99b386a06d86%40enterprisedb.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3cd4135119be0dda37ef810353a3ef2e4444970e

Modified Files
--------------
src/backend/access/brin/brin_bloom.c | 3 +++
1 file changed, 3 insertions(+)



view thread (4+ messages)  latest in thread

Message-ID: <E1rw2Xu-0022SP-Hq@gemulon.postgresql.org>
Permalink:  ../E1rw2Xu-0022SP-Hq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rw2Xu-0022SP-Hq@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Update nbits_set in brin_bloom_union
  In-Reply-To: <E1rw2Xu-0022SP-Hq@gemulon.postgresql.org>

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

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