| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: row is too big: size 8916, maximum size 8136 |
| Date: | 2005-12-07 03:47:39 |
| Message-ID: | 20051207034739.GA61498@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Dec 06, 2005 at 11:03:16PM -0300, Euler Taveira de Oliveira wrote:
> I'm doing some tests with a 700 columns' table. But when I try to load
> some data with INSERT or COPY I got that message. I verified that the
> BLCKZ is limiting the tuple size but I couldn't have a clue why it's
> not using TOAST. I'm using PostgreSQL 8.0.3 in Slackware 10.1 box.
What data types are you using? Wide fixed-length (i.e., non-TOASTable)
types might be limiting how many columns you can insert, and TOASTed
data still has in-line overhead:
http://www.postgresql.org/docs/8.0/interactive/storage-toast.html
"Allowing for the varlena header word, the total size of a TOAST
pointer datum is therefore 20 bytes regardless of the actual size
of the represented value."
With a block size of 8192, if every column is TOASTed then you'll
get a "row is too big" error if you have more than about 405 columns.
With short, non-TOASTed data you'll be able to insert more columns.
--
Michael Fuhr
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Trent Shipley | 2005-12-07 03:54:42 | Feature Request: Multi-octet raw |
| Previous Message | Gavin Sherry | 2005-12-07 03:45:51 | Re: Upcoming PG re-releases |