Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Problem copying polygon data into a table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Wood <brent(dot)wood(at)blazemail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Problem copying polygon data into a table
Date: 1999-12-13 08:00:31
Message-ID: 8442.945072031@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Brent Wood <brent(dot)wood(at)blazemail(dot)com> writes:
> The polygon has about 800 vertices (& is relatively small as some of the
> polygons in my dataset go).
> Trying to copy this into the table generates the error msg:
> ERROR: Tuple is too big: size 12892
> Does this mean that I've done summat incorrect, or that there is an
> undocumented limit in what can be loaded in a "copy" command, or a limit
> in the size (not area) of a polygon attribute?

There is a limit, but it's hardly "undocumented" --- you're running into
the infamous 8K-per-tuple limit.  I believe polygons are stored with
two float8's per vertex, so an 800-vertex polygon would take 16*800
bytes which matches your error message pretty nearly.  You can only
expect to fit maybe 500 vertexes in the standard 8K block size ...
less if there's much other data in your tuples :-(

This is a longstanding problem.  There is discussion raging right now
on the pghackers list about fixing it, and I think something may
actually happen in the next release or two.  In the meantime, the
only reasonably simple recourse is to increase BLCKSZ (see
src/include/config.h).  But you can only bump it up as far as 32K,
which'd be about 2K polygon vertexes; I don't know if that's enough
for your purposes.

			regards, tom lane

pgsql-sql by date

Next:From: Moray McConnachieDate: 1999-12-13 10:40:44
Subject: Re: [SQL] how to tell the difference between empty field and null field
Previous:From: Jan WieckDate: 1999-12-13 07:29:29
Subject: Re: [SQL] Problem copying polygon data into a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group