Re: point_ops for GiST
От | Alexander Korotkov |
---|---|
Тема | Re: point_ops for GiST |
Дата | |
Msg-id | CAPpHfdsENJCcGhf0+h7_guBFj0qL91gXAhBeVY3gMJ_c-1G40A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: point_ops for GiST (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: point_ops for GiST
|
Список | 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.
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
В списке pgsql-hackers по дате отправления: