Re: brin multi minmax crash for inet value - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: brin multi minmax crash for inet value
Date
Msg-id d2c9f2ff-a1c0-ca5b-44f4-f69ad8d2e6a1@enterprisedb.com
Whole thread Raw
In response to Re: brin multi minmax crash for inet value  (Jaime Casanova <jcasanov@systemguards.com.ec>)
List pgsql-hackers
On 9/13/21 8:19 AM, Jaime Casanova wrote:
> On Sun, Sep 12, 2021 at 08:23:44PM -0500, Justin Pryzby wrote:
>> On Sun, Sep 12, 2021 at 07:44:47PM -0500, Jaime Casanova wrote:
>>> Hi Tomas,
>>>
>>> Just noted that this query crash the server. Execute it in the
>>> regression database:
>>
>> If I'm not wrong, this is the crash fixed by e1fbe1181 in April.
>>
>> Could you check what HEAD your server is compiled from ?
>>
> 
> That was with yesterday's head but trying with today's head this
> same update works fine.
> 
> Maybe there is something else happening here, will try to investigate
> tomorrow.
> 

Per the backtrace the value is very close to 0

     delta = -1.1641532182693481e-08

so I suspect this might be a rounding error when calculating the delta 
as a difference between two inet values. That's harmless in practice, 
but it may trigger the assert.

I wonder if the delta should be calculated differently. Currently we 
calculate it "byte by byte" adding up the smaller differences. But that 
has this rounding issue.

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Added schema level support for publication.
Next
From: Daniel Gustafsson
Date:
Subject: Re: Online verification of checksums