[postgis-users] Fwd: Huge Multipolygon cannot be inserted to database

Paul Ramsey pramsey at cleverelephant.ca
Thu Jan 8 15:42:20 PST 2015

You have created an index on your geometry column using something like

  CREATE INDEX myindex ON mytable (geom);

This has created a b-tree index, which is limited in the object size
it can handle (and won't answer spatial questions efficiently in any
event).  Drop it, and replace with a GIST index,

  DROP INDEX myindex;
  CREATE INDEX myindex ON mytable USING GIST (geom);


On Thu, Jan 8, 2015 at 12:35 PM, Christoph Kleih
<christoph.kleih at googlemail.com> wrote:
> Dear postgis users,
> I am working with postgis in order to catalogue lots of datasets.
> I just store the filenames and different attributes to GeoTIFF products.
> Additionally I want to store a geometry object that contains a
> Multipolygon. The multipolygon shows where I can find data within the
> GeoTIFF.
> This Multipolygon can contain up to 2000 Polygons. The WKT insert can
> have a few hundred thousand characters.
> I want to insert the data via a python script.
> When I try to do the insert with the pgadmin, I get the following error.
> """
> ERROR:  index row requires 181440 bytes, maximum size is 8191
> """
> Is there a solution to insert such large polygons? And if yes, how can I
> do that and is it still possible to create queries that run over
> thousands of datasets and ask whether a point, or polygon is inside my
> dataset. (Inside of the multipolygon).
> I appreciate any hint!
> Thank you,
> Christoph

More information about the postgis-users mailing list