Re: Maximum row size

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Devrim GÜNDÜZ <devrim(at)CommandPrompt(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Maximum row size
Date: 2007-08-13 09:07:41
Message-ID: 87eji7ztsy.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Devrim GÜNDÜZ <devrim(at)CommandPrompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2007-08-13 13:09:13 8.3 freeze/release
Previous Message Pavel Stehule 2007-08-13 07:51:46 strange behaviour of parser - numeric domain doesn't work phantom