Re: Maximum text and bytea size?

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Ludek Finstrle <luf(at)pzkagis(dot)cz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Maximum text and bytea size?
Date: 2006-06-08 15:37:50
Message-ID: 20060608153750.GN45331@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Jun 08, 2006 at 11:18:02AM +0200, Ludek Finstrle wrote:
> Hello,
>
> I'm not sure if I understand documentation the right way.
> Is the maximum size for text and bytea types 2^30-1 bytes?
> I read this value in TOAST section. Is my opinion correct?

>From http://www.postgresql.org/docs/8.1/interactive/storage-toast.html:
"TOAST usurps the high-order two bits of the varlena length word,
thereby limiting the logical size of any value of a TOAST-able data type
to 1Gb (2^30 - 1 bytes)."

There was a proposal made some time ago to allow for a variable-length
length word format, where one of the bits in each word would specify
that there was an additional length word. That would theoretically allow
for an unlimited size on verlena columns. I don't remember what the
outcome of that discussion was, though. You should be able to find it in
the archives with enough digging.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-06-08 15:55:02 Re: Maximum text and bytea size?
Previous Message Aaron Bono 2006-06-08 14:44:13 Re: Database wont start anyway