Обсуждение: row is too big: size 8916, maximum size 8136

Поиск
Список
Период
Сортировка

row is too big: size 8916, maximum size 8136

От
Euler Taveira de Oliveira
Дата:
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 



Re: row is too big: size 8916, maximum size 8136

От
Tom Lane
Дата:
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


Re: row is too big: size 8916, maximum size 8136

От
Michael Fuhr
Дата:
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


Re: row is too big: size 8916, maximum size 8136

От
Mark Kirkwood
Дата:
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


Re: row is too big: size 8916, maximum size 8136

От
Jan Wieck
Дата:
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 #