Re: Crash in BRIN minmax-multi indexes
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Zhihong Yu <zyu@yugabyte.com>,
Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-31T18:27:39Z
Lists: pgsql-hackers
On 3/31/21 8:20 PM, Zhihong Yu wrote: > Hi, > In build_distances(): > > a1 = eranges[i].maxval; > a2 = eranges[i + 1].minval; > > It seems there was overlap between the successive ranges, leading to > delta = -6785000000 > I've been unable to reproduce this, so far :-( How exactly did you manage to reproduce it? The thing is - how could there be an overlap? The way we build expanded ranges that should not be possible, I think. Can you print the ranges at the end of fill_expanded_ranges? That should shed some light on this. FWIW I suspect those asserts on delta may be a bit problematic due to rounding errors. And I found one issue in the inet distance function, because apparently test=# select '10.2.14.243/24'::inet < '10.2.14.231/24'::inet; ?column? ---------- f (1 row) but the delta formula currently ignores the mask. But that's a separate issue. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Fix assert in BRIN build_distances
- 02699bc1fd3b 16.0 landed
- c4f64cfab9fe 15.2 landed
- 883dc0214a64 14.7 landed
-
Fix bug in brin_minmax_multi_union
- d9c5b9a9eeb9 14.0 landed
-
Fix order of parameters in BRIN minmax-multi calls
- 1dad2a5ea3d1 14.0 landed
-
Fix BRIN minmax-multi distance for inet type
- e1fbe1181c86 14.0 landed
-
Fix BRIN minmax-multi distance for timetz type
- 7262f2421a1e 14.0 landed
-
Fix BRIN minmax-multi distance for interval type
- 2b10e0e3c2ca 14.0 landed