[postgis-users] Fwd: Posgresql Gist indexing error

Paul Ramsey pramsey at refractions.net
Tue May 14 10:09:02 PDT 2002


Here is Teodor's explanation of the bug...

Teodor Sigaev wrote:
> 
> Thanks a lot for your test suite.
> Pls, test attached patch for contrib/rtree_gist. If it's ok, it will be included
> in 7.2.2 and 7.3.
> 
> The problem is in algorithm of split page("New Linear Node Splitting Algorithm
> for R-trees", C.H. Ang and T.C. Tan). This algorithm has a bug in special case
> for splitting page contains boxes like this (you must have a fixed font in your
> viewer for correct look):
> +---------------------------------+
> | . . .                           |
> |  . . . +-+                      |
> |        | |                      |
> |        +-+                      |
> |                                 |
> |                                 |
> |                                 |
> |                                 |
> |                                 |
> |                                 |
> |                                 |
> +---------------------------------+
> Points means small boxes :). Algorithm may produce two pages, one of them has 0
> boxes and other has all. I try to solve the problem by reordering boxes by
> square of boxes  and split page again with looking for size of pages. I hope,
> it'll work. Oleg will contact with author about this.
> 
> Oleg Bartunov wrote:
> > Thank Chris for the bug report and test data !
> >
> > I've got the same problem on my Linux box running 7.2.1
> > We'll try to fix it.
> >
> >       Regards,
> >               Oleg
> > On Mon, 13 May 2002, Chris Hodgson wrote:
> >
> >
> >>Hello Teodor and Oleg,
> >>
> >>While testing your rtree gist indexing with postgres 7.2, I came across
> >>a dataset that produces the following error when I try to create the
> >>index:
> >>
> >>ERROR:  MemoryContextAlloc: invalid request size 0
> >>
> >>And the index is not created. I was wondering if you might know what was
> >>causing this error? It seems to have something to do with the picksplit
> >>function, and the same error does not occur using your quadratic
> >>algorithm with postgres 7.1.
> >>
> >>The original dataset was over 600,000 rows, but I've managed to get it
> >>down to 12,692 - any smaller and it doesn't have the error anymore. I
> >>have a attached a gzipped dump of the table which causes this error, so
> >>that you could attempt to recreate it.
> >>
> >>Thanks for any help you can offer.
> >>




More information about the postgis-users mailing list