Re: Tuple too big

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Mikhail Terekhov <terekhov(at)emc(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Tuple too big
Date: 1999-07-02 23:43:52
Message-ID: 199907022343.TAA18619@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I've encountered a strange behavior of the VACUUM ANALYZE command.
> It seems that this command works only if the size of a text field
> does not exceed approximately 4050 bytes! So the real limit on
> tuple size is a half of the max tuple size. I've checked this effect
> on Postgres 6.4.2 (Sparc Solaris 2.5.1) and Postgres 6.5 (SUSE 6.1
> Linux, kernel 2.2.5). Is this a bug or known feature?
> The python script used to reproduce this problem and results for
> v6.4.2 and v6.5 are follows.
> size= 4059
> size= 4060
> size= 4061
> size= 4062
> size= 4063
> size= 4064
> size= 4065
> ERROR: Tuple is too big: size 8188

I have always suspected these default values where wrong, but no one
reported it as a bug.

Here is a patch for 6.5 which will prevent the creation of these too big
tuples in certain cases. Seems we should also check for max length at
the time we create the table, but it doesn't look like there is any code
to do that yet.

I am not going to apply this to 6.5.1 because it may have some unknown
side-affects.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-07-03 00:25:40 Re: [HACKERS] Re: Tuple too big
Previous Message Thomas Lockhart 1999-07-02 21:45:51 Re: sgml tool