Re: BUG #17774: Assert triggered on brin_minmax_multi.c - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17774: Assert triggered on brin_minmax_multi.c
Date
Msg-id 3492169.1675872316@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17774: Assert triggered on brin_minmax_multi.c  (Dmitry Dolgov <9erthalion6@gmail.com>)
Responses Re: BUG #17774: Assert triggered on brin_minmax_multi.c  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-bugs
Dmitry Dolgov <9erthalion6@gmail.com> writes:
>> On Wed, Feb 08, 2023 at 10:03:01AM -0500, Tom Lane wrote:
>> I'd believe this argument more readily if the calculation weren't being
>> done in float arithmetic.  Since it is, you're at the mercy of roundoff
>> error ... and that small negative delta could certainly pass for
>> roundoff error.

> Hmm...yeah, good point. In both the reproducer I've posted and the
> backtrace from the thread the delta is indeed rather small.

I bet also it only fails when dealing with IPv6 addresses.
With 32-bit IPv4 addresses, a float8 would have enough mantissa
bits that the calculation wouldn't become imprecise.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Dmytro Hanzhelo
Date:
Subject: Re: BUG #17782: ERROR: variable not found in subplan target lists
Next
From: Heikki Linnakangas
Date:
Subject: Re: BUG #17760: SCRAM authentication fails with "modern" (rsassaPss signature) server certificate