row is too big: size 8916, maximum size 8136

Started by Euler Taveira de Oliveiraabout 20 years ago5 messages
#1Euler Taveira de Oliveira
eulerto@yahoo.com.br

Hi,

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.
Let me know if you want a test case or other useful information.

Euler Taveira de Oliveira
euler[at]yahoo_com_br

_______________________________________________________
Yahoo! doce lar. Fa�a do Yahoo! sua homepage.
http://br.yahoo.com/homepageset.html

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Euler Taveira de Oliveira (#1)
Re: row is too big: size 8916, maximum size 8136

Euler Taveira de Oliveira <eulerto@yahoo.com.br> writes:

I'm doing some tests with a 700 columns' table.

Redesign your schema...

regards, tom lane

#3Michael Fuhr
mike@fuhr.org
In reply to: Euler Taveira de Oliveira (#1)
Re: row is too big: size 8916, maximum size 8136

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

#4Mark Kirkwood
markir@paradise.net.nz
In reply to: Euler Taveira de Oliveira (#1)
Re: row is too big: size 8916, maximum size 8136

Euler Taveira de Oliveira wrote:

Hi,

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.
Let me know if you want a test case or other useful information.

700 columns - yuck... recompiling with BLCKSZ=16384 or 32768 (say) might
allow you this many ....(will require an initdb).

regards

Mark

#5Jan Wieck
JanWieck@Yahoo.com
In reply to: Euler Taveira de Oliveira (#1)
Re: row is too big: size 8916, maximum size 8136

On 12/6/2005 9:03 PM, Euler Taveira de Oliveira wrote:

Hi,

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.
Let me know if you want a test case or other useful information.

The external reference of a toasted attribute is 20 bytes in size.

I might be wrong, but at 700 columns you have to ask your developers
some serious questions about their qualification.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #