diff options
| author | Tomas Vondra <tomas.vondra@postgresql.org> | 2023-03-20 09:51:50 +0100 |
|---|---|---|
| committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2023-03-20 10:20:35 +0100 |
| commit | 0c7726c2827e3ff685c460acd757a4b0c7ee09f7 (patch) | |
| tree | 22e63a65bd74b45ec865b146726681a506acf1db /contrib/postgres_fdw/connection.c | |
| parent | 8de4660a57e6e165debc949d2cb922f60f8aa921 (diff) | |
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
Diffstat (limited to 'contrib/postgres_fdw/connection.c')
0 files changed, 0 insertions, 0 deletions
