postgresql/src/backend/access
Tomas Vondra e858312683 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
2023-03-20 10:24:14 +01:00
..
brin Fix netmask handling in inet_minmax_multi_ops 2023-03-20 10:24:14 +01:00
common Revert "Add eager and lazy freezing strategies to VACUUM." 2023-01-25 22:22:27 -08:00
gin Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
gist Remove useless casts to (void *) in arguments of some system functions 2023-02-07 06:57:59 +01:00
hash Remove unnecessary #ifdef USE_ICU and branch. 2023-02-23 11:20:00 -08:00
heap Remove bms_first_member(). 2023-03-02 11:34:29 -05:00
index Update copyright for 2023 2023-01-02 15:00:37 -05:00
nbtree Update types in smgr API 2023-02-27 07:47:46 +01:00
rmgrdesc Update copyright for 2023 2023-01-02 15:00:37 -05:00
spgist Update types in smgr API 2023-02-27 07:47:46 +01:00
table New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tablesample Update copyright for 2023 2023-01-02 15:00:37 -05:00
transam Revise pg_pwrite_zeros() 2023-03-06 13:21:33 +09:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00