Re: brin multi minmax crash for inet value

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: brin multi minmax crash for inet value
Date: 2021-09-13 11:43:24
Message-ID: d2c9f2ff-a1c0-ca5b-44f4-f69ad8d2e6a1@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-09-13 11:45:08 Re: Online verification of checksums
Previous Message Amit Kapila 2021-09-13 11:41:41 Re: Added schema level support for publication.