aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2025-03-26 16:50:13 +0100
committerTomas Vondra <tomas.vondra@postgresql.org>2025-03-26 17:01:41 +0100
commit818245506c285e0325141dabb1ced45057937502 (patch)
tree6a8aa59a64357d0e4839a540dd548ea1505b0ea6 /doc/src
parent55527368bd07248e91e3d37a782bf66b76f06865 (diff)
downloadpostgresql-818245506c285e0325141dabb1ced45057937502.tar.gz
postgresql-818245506c285e0325141dabb1ced45057937502.zip
Keep the decompressed filter in brin_bloom_union
The brin_bloom_union() function combines two BRIN summaries, by merging one filter into the other. With bloom, we have to decompress the filters first, but the function failed to update the summary to store the merged filter. As a consequence, the index may be missing some of the data, and return false negatives. This issue exists since BRIN bloom indexes were introduced in Postgres 14, but at that point the union function was called only when two sessions happened to summarize a range concurrently, which is rare. It got much easier to hit in 17, as parallel builds use the union function to merge summaries built by workers. Fixed by storing a pointer to the decompressed filter, and freeing the original one. Free the second filter too, if it was decompressed. The freeing is not strictly necessary, because the union is called in short-lived contexts, but it's tidy. Backpatch to 14, where BRIN bloom indexes were introduced. Reported by Arseniy Mukhin, investigation and fix by me. Reported-by: Arseniy Mukhin Discussion: https://postgr.es/m/18855-1cf1c8bcc22150e6%40postgresql.org Backpatch-through: 14
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions