Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2013-02-08 Thread Tom Lane
Alexander Korotkov writes: > On Sat, Nov 3, 2012 at 4:23 AM, Noah Misch wrote: >> ... At internal pages, gist_point_consistent() should implement >> "point <@ box" with an algorithm near-equivalent to box_overlap(). (As an >> optional deviation, it may use exact comparisons despite box_overlap(

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-10 Thread Noah Misch
On Sun, Nov 04, 2012 at 01:53:19AM +0400, Alexander Korotkov wrote: > On Sat, Nov 3, 2012 at 4:23 AM, Noah Misch wrote: > > I was thrown off by your use of a different, albeit > > mathematically > > equivalent, algorithm from the one used in box_overlap(). Please don't do > > that; either use box

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-03 Thread Alexander Korotkov
On Sat, Nov 3, 2012 at 4:23 AM, Noah Misch wrote: > On Fri, Nov 02, 2012 at 09:01:17PM +0400, Alexander Korotkov wrote: > > On Fri, Nov 2, 2012 at 4:46 PM, Noah Misch wrote: > > > On Fri, Nov 02, 2012 at 04:05:30PM +0400, Alexander Korotkov wrote: > > > > On Thu, Oct 18, 2012 at 11:18 PM, Noah M

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-02 Thread Noah Misch
On Fri, Nov 02, 2012 at 09:01:17PM +0400, Alexander Korotkov wrote: > On Fri, Nov 2, 2012 at 4:46 PM, Noah Misch wrote: > > On Fri, Nov 02, 2012 at 04:05:30PM +0400, Alexander Korotkov wrote: > > > On Thu, Oct 18, 2012 at 11:18 PM, Noah Misch wrote: > > > > > > > --- 1339,1356 > > > > >

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-02 Thread Alexander Korotkov
On Fri, Nov 2, 2012 at 4:46 PM, Noah Misch wrote: > On Fri, Nov 02, 2012 at 04:05:30PM +0400, Alexander Korotkov wrote: > > On Thu, Oct 18, 2012 at 11:18 PM, Noah Misch wrote: > > > > > --- 1339,1356 > > > > *recheck = false; > > > > break; > > >

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-02 Thread Noah Misch
On Fri, Nov 02, 2012 at 04:05:30PM +0400, Alexander Korotkov wrote: > On Thu, Oct 18, 2012 at 11:18 PM, Noah Misch wrote: > > > --- 1339,1356 > > > *recheck = false; > > > break; > > > case BoxStrategyNumberGroup: > > > !

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-11-02 Thread Alexander Korotkov
On Thu, Oct 18, 2012 at 11:18 PM, Noah Misch wrote: > On Thu, Oct 11, 2012 at 07:17:28AM -0400, Noah Misch wrote: > > On Tue, Oct 02, 2012 at 01:58:40PM -0400, Noah Misch wrote: > > > > > On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane > wrote: > > > > >> There's also the big-picture question of wheth

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-23 Thread Noah Misch
On Tue, Oct 23, 2012 at 11:18:48AM -0300, Alvaro Herrera wrote: > Please see downthread -- there is some commentary from Noah ([1] and > others) about the patch itself. As far I understand, some changes are > still needed, and I don't know if the last version submitted is the > version that should

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-23 Thread Alvaro Herrera
Oleg Bartunov escribió: > Yes, it's a bug and it needs to be applied ! Oleg, This patch has been waiting a long time for some review and commit. Since it fixes existing bugs, it should be backpatched; or at least some people believe it needs to be. Please see downthread -- there is some commenta

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-18 Thread Noah Misch
On Thu, Oct 11, 2012 at 07:17:28AM -0400, Noah Misch wrote: > On Tue, Oct 02, 2012 at 01:58:40PM -0400, Noah Misch wrote: > > > > On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: > > > >> There's also the big-picture question of whether we should just get rid > > > >> of fuzzy comparisons in the g

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-11 Thread Noah Misch
On Tue, Oct 02, 2012 at 01:58:40PM -0400, Noah Misch wrote: > > > On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: > > >> There's also the big-picture question of whether we should just get rid > > >> of fuzzy comparisons in the geometric types instead of trying to hack > > >> indexes to work arou

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-10-02 Thread Noah Misch
On Tue, Aug 28, 2012 at 05:04:09PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: > >> There's also the big-picture question of whether we should just get rid > >> of fuzzy comparisons in the geometric types instead of trying to hack > >> indexes

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Robert Haas
On Tue, Aug 28, 2012 at 5:04 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: >>> There's also the big-picture question of whether we should just get rid >>> of fuzzy comparisons in the geometric types instead of trying to hack >>> indexes to work aro

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Tom Lane
Robert Haas writes: > On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: >> There's also the big-picture question of whether we should just get rid >> of fuzzy comparisons in the geometric types instead of trying to hack >> indexes to work around them. > +1 for that approach, but only if I don't h

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-28 Thread Robert Haas
On Mon, Aug 27, 2012 at 7:43 PM, Tom Lane wrote: > There's also the big-picture question of whether we should just get rid > of fuzzy comparisons in the geometric types instead of trying to hack > indexes to work around them. +1 for that approach, but only if I don't have to do the work. Otherwis

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-27 Thread Bruce Momjian
On Mon, Aug 27, 2012 at 07:43:49PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I need someone to review this patch for 9.3. We have already missed > > fixing this for 9.2. > > So put it in the next commitfest. Done. I have linked to your comment below too. -

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-27 Thread Bruce Momjian
On Mon, Aug 27, 2012 at 07:43:49PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I need someone to review this patch for 9.3. We have already missed > > fixing this for 9.2. > > So put it in the next commitfest. > > FWIW, I looked at this last week, and concluded I didn't have enough > con

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-27 Thread Tom Lane
Bruce Momjian writes: > I need someone to review this patch for 9.3. We have already missed > fixing this for 9.2. So put it in the next commitfest. FWIW, I looked at this last week, and concluded I didn't have enough confidence in it to push it into 9.2 at the last minute. There's also the bi

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-08-27 Thread Bruce Momjian
I need someone to review this patch for 9.3. We have already missed fixing this for 9.2. --- On Thu, Jun 21, 2012 at 10:53:43PM +0400, Alexander Korotkov wrote: > On Wed, Feb 22, 2012 at 5:56 PM, Alexander Korotkov > wrote

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-06 Thread Oleg Bartunov
Yes, it's a bug and it needs to be applied ! On Tue, Jul 3, 2012 at 7:44 PM, Robert Haas wrote: > On Tue, Jul 3, 2012 at 11:34 AM, Tom Lane wrote: >> Robert Haas writes: >>> On Thu, Jun 21, 2012 at 2:53 PM, Alexander Korotkov >>> wrote: I think we definitely should apply this patch before

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-03 Thread Alexander Korotkov
On Tue, Jul 3, 2012 at 7:58 PM, Tom Lane wrote: > Oleg Bartunov writes: > > Yes, it's a bug and it needs to be applied ! > > Well, it needs to be *reviewed* first, and nobody's done that ... > I've discussed it with Teodor privately and he has verified by thoughts. I think if he'll verify it in

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-03 Thread Tom Lane
Oleg Bartunov writes: > Yes, it's a bug and it needs to be applied ! Well, it needs to be *reviewed* first, and nobody's done that ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-03 Thread Robert Haas
On Tue, Jul 3, 2012 at 11:34 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Jun 21, 2012 at 2:53 PM, Alexander Korotkov >> wrote: >>> I think we definitely should apply this patch before 9.2 release, because it >>> is a bug fix. Otherwise people will continue produce incorrect GiST indexes

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-03 Thread Tom Lane
Robert Haas writes: > On Thu, Jun 21, 2012 at 2:53 PM, Alexander Korotkov > wrote: >> I think we definitely should apply this patch before 9.2 release, because it >> is a bug fix. Otherwise people will continue produce incorrect GiST indexes >> with in-core geometrical opclasses until 9.3. Patch

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-07-03 Thread Robert Haas
On Thu, Jun 21, 2012 at 2:53 PM, Alexander Korotkov wrote: > On Wed, Feb 22, 2012 at 5:56 PM, Alexander Korotkov > wrote: >> >> Attached patch fixes GiST behaviour without altering operators behaviour. > > > I think we definitely should apply this patch before 9.2 release, because it > is a bug f

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-06-21 Thread Alexander Korotkov
On Wed, Feb 22, 2012 at 5:56 PM, Alexander Korotkov wrote: > Attached patch fixes GiST behaviour without altering operators behaviour. > I think we definitely should apply this patch before 9.2 release, because it is a bug fix. Otherwise people will continue produce incorrect GiST indexes with in

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-04-09 Thread Alexander Korotkov
On Mon, Mar 12, 2012 at 3:50 PM, Alexander Korotkov wrote: > I believe that attached version of patch can be backpatched. It fixes this > problem without altering of index building procedure. It just makes checks > in internal pages softener enough to compensate effect of gist_box_same > implement

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-03-12 Thread Alexander Korotkov
I believe that attached version of patch can be backpatched. It fixes this problem without altering of index building procedure. It just makes checks in internal pages softener enough to compensate effect of gist_box_same implementation. -- With best regards, Alexander Korotkov. *** a/src/back

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-02-22 Thread Alexander Korotkov
Attached patch fixes GiST behaviour without altering operators behaviour. -- With best regards, Alexander Korotkov. *** a/src/backend/access/gist/gistproc.c --- b/src/backend/access/gist/gistproc.c *** *** 836,842 gist_box_picksplit(PG_FUNCTION_ARGS) } /* ! * Equality

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-02-20 Thread Alexander Korotkov
On Mon, Feb 20, 2012 at 7:22 PM, Tom Lane wrote: > Alexander Korotkov writes: > > On Thu, Feb 16, 2012 at 11:43 AM, Alexander Korotkov > > wrote: > >> Described differences leads to incorrect behaviour of GiST index. > >> The question is: what is correct way to fix it? Should on_pb also use > FP

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-02-20 Thread Tom Lane
Alexander Korotkov writes: > On Thu, Feb 16, 2012 at 11:43 AM, Alexander Korotkov > wrote: >> Described differences leads to incorrect behaviour of GiST index. >> The question is: what is correct way to fix it? Should on_pb also use FP* >> or consistent method should behave like on_pb? > Any comm

Re: [HACKERS] Incorrect behaviour when using a GiST index on points

2012-02-20 Thread Alexander Korotkov
On Thu, Feb 16, 2012 at 11:43 AM, Alexander Korotkov wrote: > Described differences leads to incorrect behaviour of GiST index. > The question is: what is correct way to fix it? Should on_pb also use FP* > or consistent method should behave like on_pb? > Any comments on this? Current behaviour de