Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitccd8f0f

Browse files
committed
Update nbits_set in brin_bloom_union
Properly update the number of bits set in the bitmap after merging thefilters in brin_bloom_union.This is mostly harmless, as the counter is used only in the outputfunction, which means pageinspect may show incorrect information aboutthe BRIN summary. The counter does not affect correctness.Discovered while adding a regression test comparing indexes built withand without parallelism. The parallel index builds exercise the unionprocedure when merging results from workers, which is otherwise veryhard 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: 14Discussion:https://postgr.es/m/1df00a66-db5a-4e66-809a-99b386a06d86%40enterprisedb.com
1 parent4e62ba2 commitccd8f0f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/backend/access/brin/brin_bloom.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,9 @@ brin_bloom_union(PG_FUNCTION_ARGS)
660660
for (i=0;i<nbytes;i++)
661661
filter_a->data[i] |=filter_b->data[i];
662662

663+
/* update the number of bits set in the filter */
664+
filter_a->nbits_set=pg_popcount((constchar*)filter_a->data,nbytes);
665+
663666
PG_RETURN_VOID();
664667
}
665668

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp