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