Re: GiST kNN search queue (Re: KNN-GiST with recheck) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: GiST kNN search queue (Re: KNN-GiST with recheck)
Date
Msg-id 54E3ABFF.8050101@vmware.com
Whole thread Raw
In response to Re: GiST kNN search queue (Re: KNN-GiST with recheck)  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
On 02/17/2015 02:56 PM, Alexander Korotkov wrote:
> Hi!
>
> On Mon, Dec 22, 2014 at 1:07 PM, Heikki Linnakangas <hlinnakangas@vmware.com
>> wrote:
>
>> Ok, thanks for the review! I have committed this, with some cleanup and
>> more comments added.
>
> ISTM that checks in pairingheap_GISTSearchItem_cmp is incorrect. This
> function should perform inverse comparison. Thus, if item a should be
> checked first function should return 1. Current behavior doesn't lead to
> incorrect query answers, but it could be slower than correct version.

Good catch. Fixed, thanks.

While testing this, I also noticed a bug in the pairing heap code 
itself. Fixed that too.

- Heikki



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Commit fest 2015-12 enters money time
Next
From: Robert Haas
Date:
Subject: Re: Sequence Access Method WIP