Re: Rtree; cannot create index on polygons with lots of points - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rtree; cannot create index on polygons with lots of points
Date
Msg-id 27759.990704151@sss.pgh.pa.us
Whole thread Raw
In response to Rtree; cannot create index on polygons with lots of points  (Dave Blasby <dblasby@refractions.net>)
List pgsql-hackers
Dave Blasby <dblasby@refractions.net> writes:
> So far, so good, but when you try to create an rtree index, you get;
>> create index quick on test_geom using rtree (poly);
> ERROR:  index_formtuple: data takes 20040 bytes, max is 8191

Yup.  We don't yet have a solution that allows index entries to be moved
into a TOAST table (and even if we did, it'd doubtless be slower than
one would like for an index).

> The polygon type is actually creating the rtree index on a small portion
> of the actual polygon data (its boundingbox, NOT the actual points). 
> Why does the index need to store the entire geometry?

rtree doesn't have any notion of compression or lossy storage of data.
GIST does, so I'd recommend that you take a hard look at moving over
to GIST.  Over the long run I think we are going to abandon rtree in
favor of GIST --- the latter probably has more bugs at present, but once
those are flushed out I see no real reason to keep supporting rtree.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Smaller access privilege changes
Next
From: Tom Lane
Date:
Subject: Re: Smaller access privilege changes