From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: point_ops for GiST |
Date: | 2015-10-12 09:17:10 |
Message-ID: | CAPpHfdsENJCcGhf0+h7_guBFj0qL91gXAhBeVY3gMJ_c-1G40A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi, Alvaro!
On Tue, May 12, 2015 at 9:13 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
> Robert Haas wrote:
> > 2009/12/30 Teodor Sigaev <teodor(at)sigaev(dot)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.
See following discussion
http://www.postgresql.org/message-id/CAPpHfdvGticGniaj88VCHzHboXJobUhjLm6c09q_Op_u9EoBFg@mail.gmail.com
and
commit
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=3c29b196b0ce46662cb9bb7a1f91079fbacbcabb
"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
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2015-10-12 09:24:40 | Re: point_ops for GiST |
Previous Message | Peter Geoghegan | 2015-10-12 07:47:13 | Re: More work on SortSupport for text - strcoll() and strxfrm() caching |