pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMaximum text and bytea size?
4+ messages / 3 participants
[nested] [flat]
* Maximum text and bytea size?
@ 2006-06-08 09:18 Ludek Finstrle <luf@pzkagis.cz>
2006-06-08 15:37 ` Re: Maximum text and bytea size? Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 1 reply; 4+ messages in thread
From: Ludek Finstrle @ 2006-06-08 09:18 UTC (permalink / raw)
To: pgsql-admin
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?
Thanks,
Luf
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Maximum text and bytea size?
2006-06-08 09:18 Maximum text and bytea size? Ludek Finstrle <luf@pzkagis.cz>
@ 2006-06-08 15:37 ` Jim C. Nasby <jnasby@pervasive.com>
2006-06-08 15:55 ` Re: Maximum text and bytea size? Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Jim C. Nasby @ 2006-06-08 15:37 UTC (permalink / raw)
To: Ludek Finstrle <luf@pzkagis.cz>; +Cc: 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@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Maximum text and bytea size?
2006-06-08 09:18 Maximum text and bytea size? Ludek Finstrle <luf@pzkagis.cz>
2006-06-08 15:37 ` Re: Maximum text and bytea size? Jim C. Nasby <jnasby@pervasive.com>
@ 2006-06-08 15:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-06-08 16:33 ` Re: Maximum text and bytea size? Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2006-06-08 15:55 UTC (permalink / raw)
To: Jim C. Nasby <jnasby@pervasive.com>; +Cc: Ludek Finstrle <luf@pzkagis.cz>; pgsql-admin
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Thu, Jun 08, 2006 at 11:18:02AM +0200, Ludek Finstrle wrote:
>> 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.
Hm, I don't remember that. It seems rather pointless, as I'm quite sure
that the *practical* limit is a great deal less than 1Gb. Has anyone
done any performance testing of GB-sized toasted values?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Maximum text and bytea size?
2006-06-08 09:18 Maximum text and bytea size? Ludek Finstrle <luf@pzkagis.cz>
2006-06-08 15:37 ` Re: Maximum text and bytea size? Jim C. Nasby <jnasby@pervasive.com>
2006-06-08 15:55 ` Re: Maximum text and bytea size? Tom Lane <tgl@sss.pgh.pa.us>
@ 2006-06-08 16:33 ` Jim C. Nasby <jnasby@pervasive.com>
0 siblings, 0 replies; 4+ messages in thread
From: Jim C. Nasby @ 2006-06-08 16:33 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ludek Finstrle <luf@pzkagis.cz>; pgsql-admin
On Thu, Jun 08, 2006 at 11:55:02AM -0400, Tom Lane wrote:
> "Jim C. Nasby" <jnasby@pervasive.com> writes:
> > On Thu, Jun 08, 2006 at 11:18:02AM +0200, Ludek Finstrle wrote:
> >> 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.
>
> Hm, I don't remember that. It seems rather pointless, as I'm quite sure
> that the *practical* limit is a great deal less than 1Gb. Has anyone
> done any performance testing of GB-sized toasted values?
Given how toasted data is currently stored, you're probably correct. If
it was switched to a binary format that didn't have all the table/tuple
overheard (which I seem to recall a discussion about), it could be a
very different story.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-06-08 16:33 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-08 09:18 Maximum text and bytea size? Ludek Finstrle <luf@pzkagis.cz>
2006-06-08 15:37 ` Jim C. Nasby <jnasby@pervasive.com>
2006-06-08 15:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-06-08 16:33 ` Jim C. Nasby <jnasby@pervasive.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox