git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 0b51d42) | patch
Fix netmask handling in inet_minmax_multi_ops
2023年3月20日 08:51:50 +0000 (09:51 +0100)
2023年3月20日 09:24:14 +0000 (10:24 +0100)
commit e8583126833a53f4eebe28a8de45d128f01ff664
Fix netmask handling in inet_minmax_multi_ops

When calculating distance in brin_minmax_multi_distance_inet(), the
netmask was applied incorrectly. This results in (seemingly) incorrect
ordering of values, triggering an assert.

For builds without asserts this is mostly harmless - we may merge other
ranges, possibly resulting in slightly less efficient index. But it's
still correct and the greedy algorithm doesn't guarantee optimality
anyway.

Backpatch to 14, where minmax-multi indexes were introduced.

Reported by Dmitry Dolgov, investigation and fix by me.

Reported-by: Dmitry Dolgov
Backpatch-through: 14
Discussion: https://postgr.es/m/17774-c6f3e36dd4471e67@postgresql.org
src/backend/access/brin/brin_minmax_multi.c diff | blob | blame | history
src/test/regress/expected/brin_multi.out diff | blob | blame | history
src/test/regress/sql/brin_multi.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /