Re: GiST kNN search queue (Re: KNN-GiST with recheck)

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GiST kNN search queue (Re: KNN-GiST with recheck)
Date: 2015-02-17 21:00:47
Message-ID: 54E3ABFF.8050101@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)vmware(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-02-17 22:11:26 Re: Sequence Access Method WIP
Previous Message Corey Huinker 2015-02-17 20:55:44 Re: Commit fest 2015-12 enters money time