Re: Amcheck verification of GiST and GIN - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: Amcheck verification of GiST and GIN
Date
Msg-id CAAhFRxh-c+xG6AsPvUw8jQEj73y8m6j8-MR2xmuk3D8d0Bj3Fg@mail.gmail.com
Whole thread Raw
In response to Re: Amcheck verification of GiST and GIN  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
Hi Peter,

Thanks for the feedback! I'll work on it during the weekend.

On Thu, Mar 16, 2023 at 6:23 PM Peter Geoghegan <pg@bowt.ie> wrote:
>
> existence of a "same" routine hints at some confusion about "equality
> versus equivalence" issues.

Hmm...yes, actually, GiST deals with floats routinely. And there might
be some sorts of NaNs and Infs that are equal, but not binary
equivalent.
I'll think more about it.

gist_get_adjusted() calls "same" routine, which for type point will
use FPeq(double A, double B). And this might be kind of a corruption
out of the box. Because it's an epsilon-comparison, ε=1.0E-06.
GiST might miss newly inserted data, because the "adjusted" tuple was
"same" if data is in proximity of 0.000001 of any previously indexed
point, but out of known MBRs.
I'll try to reproduce this tomorrow, so far no luck.


Best regards, Andrey Borodin.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Add pg_walinspect function with block info columns
Next
From: Amit Kapila
Date:
Subject: BF mamba failure