pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brent Wood <brent.wood@blazemail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Problem copying polygon data into a table
Date: Mon, 13 Dec 1999 03:00:31 -0500
Message-ID: <8442.945072031@sss.pgh.pa.us> (raw)
In-Reply-To: <385493F8.D8D17B68@blazemail.com>

Brent Wood <brent.wood@blazemail.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



view thread (3+ messages)

Message-ID: <8442.945072031@sss.pgh.pa.us>
Permalink:  ../8442.945072031@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8442.945072031@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, brent.wood@blazemail.com
  Subject: Re: [SQL] Problem copying polygon data into a table
  In-Reply-To: <8442.945072031@sss.pgh.pa.us>
  References: <385493F8.D8D17B68@blazemail.com> <8442.945072031@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox