Re: KNN-GiST with recheck

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: KNN-GiST with recheck
Date: 2014-09-17 08:12:50
Message-ID: 20140917081250.GA28651@hasegeli.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > While looking it at I found a bug. It returns the second column
> > in wrong order when both of the distance functions return recheck = true.
> > Test script attached to run on the regression database. I tried to
> > fix but could not. searchTreeItemDistanceRecheck function is not
> > very easy to follow. I think it deserves more comments.
>
> Fixed, thanks. It was logical error in comparison function implementation.

I managed to break it again by ordering rows only by the second column
of the index. Test script attached.

Attachment Content-Type Size
knn-gist-recheck-test-secondcolumn.sql application/x-sql 1.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Emre Hasegeli 2014-09-17 08:30:00 Re: KNN-GiST with recheck
Previous Message Tom Lane 2014-09-17 03:45:32 Re: jsonb format is pessimal for toast compression