postgresql/src/backend/access
Tomas Vondra 0c7726c282 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:20:35 +01:00
..
brin Fix netmask handling in inet_minmax_multi_ops 2023-03-20 10:20:35 +01:00
common Fix typos in comments, code and documentation 2023-01-03 16:26:27 +09:00
gin Fix ordering issue with WAL operations in GIN fast insert path 2022-10-26 09:41:13 +09:00
gist Suppress variable-set-but-not-used warnings from clang 15. 2022-09-20 12:04:37 -04:00
hash Fix memory leak for hashing with nondeterministic collations. 2022-12-01 11:55:59 -08:00
heap Fix theoretical torn page hazard. 2022-11-11 12:46:11 -08:00
index Update copyright for 2022 2022-01-07 19:04:57 -05:00
nbtree Revert changes in HOT handling of BRIN indexes 2022-06-16 15:02:49 +02:00
rmgrdesc Fix assert in logicalmsg_desc 2022-08-17 00:13:42 +02:00
spgist Fix typos in comments, code and documentation 2023-01-03 16:26:27 +09:00
table Remove extraneous blank lines before block-closing braces 2022-04-13 19:16:02 +02:00
tablesample Update copyright for 2022 2022-01-07 19:04:57 -05:00
transam Un-revert "Disable STARTUP_PROGRESS_TIMEOUT in standby mode." 2023-02-10 16:27:05 -05:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00