Re: Maximum row size - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Maximum row size
Date
Msg-id 87eji7ztsy.fsf@oxford.xeocode.com
Whole thread Raw
In response to Maximum row size  (Devrim GÜNDÜZ <devrim@CommandPrompt.com>)
Responses Re: Maximum row size  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Devrim GÜNDÜZ <devrim@CommandPrompt.com> writes:

> What is the maximum row size for PostgreSQL?
>
> http://www.postgresql.org/about/ says 1.6 TB

I think this comes from the maximum of 1600 columns times the maximum of 1GB
per (toasted) datum.

However 1600 toasted datums won't fit on an 8k page. Each toast pointer is 17
bytes so only 480 toast pointers will fit on a 8k page. Which may be the
rationale for this?

> http://www.postgresql.org/docs/faqs.FAQ.html says 400 GB.

Before packed varlenas We used to be able to fit only 408 minus a few for the
page header. Perhaps it was 400 then, or perhaps they were just rounding down.

So with packed varlenas we can raise the second number to 480GB. But it's kind
of pie-in-the-sky since it depends on every column being toasted (and not
compressed). It's much more normal to have some columns be quite large and
others more normal sized or different data types.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: strange behaviour of parser - numeric domain doesn't work phantom
Next
From: Michael Meskes
Date:
Subject: 8.3 freeze/release