Re: Crash in gist insertion on pathological box data - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: Crash in gist insertion on pathological box data
Date
Msg-id 49D5095C.5050204@sigaev.ru
Whole thread Raw
In response to Re: Crash in gist insertion on pathological box data  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Crash in gist insertion on pathological box data  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
> even further.  And what confidence do you have that this change
> eliminates all forms of the problem, anyway?

Yes, I think. Because that part of code ( if (IS_BADRATIO) {...} ) is a corner 
case itself. In example from Andrew, all boxes are placed to one page because of 
floating-point rounding.

We could check IS_BADRATIO again and if it's just put one half of all boxes on 
one page and another half to the another page as it does if all boxes are equal. 
But FPeq() seemed to me a simpler solution and FP* comparisons are widely used 
in geometry.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] string_to_array with empty input
Next
From: Heikki Linnakangas
Date:
Subject: Re: [pgsql-www] Mentors needed urgently for SoC & PostgreSQL Student Internships