Re: point_ops for GiST - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: point_ops for GiST
Date
Msg-id CAPpHfdsENJCcGhf0+h7_guBFj0qL91gXAhBeVY3gMJ_c-1G40A@mail.gmail.com
Whole thread Raw
In response to Re: point_ops for GiST  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: point_ops for GiST
List pgsql-hackers
Hi, Alvaro!

On Tue, May 12, 2015 at 9:13 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Robert Haas wrote:
> 2009/12/30 Teodor Sigaev <teodor@sigaev.ru>:
> > Sync with current CVS
>
> I have reviewed this patch and it looks good to me.  The only
> substantive question I have is why gist_point_consistent() uses a
> different coding pattern for the box case than it does for the polygon
> and circle cases?  It's not obvious to me on the face of it why these
> aren't consistent.

Emre Hasegeli just pointed out to me that this patch introduced
box_contain_pt() and in doing so used straight C comparison (<= etc)
instead of FPlt() and friends.  I would think that that's a bug and
needs to be changed -- but certainly not backpatched, because gist
indexes would/might become corrupt.

This was already fixed for GiST.
"Consistent" method of GiST influences only search and can't lead to corrupt indexes. However, "same" method can lead to corrupt indexes.
However, this is not the reason to not backpatch the changes and preserve buggy behaviour; this is the reason to recommend reindexing to users. And it was already backpatched.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Next
From: Alexander Korotkov
Date:
Subject: Re: point_ops for GiST