Re: TOAST not working - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: TOAST not working
Date
Msg-id 20060612100703.GB3829@svana.org
Whole thread Raw
In response to Re: TOAST not working  (Angus Berry <angus.berry@elkenserve.com>)
List pgsql-general
On Sat, Jun 10, 2006 at 10:43:02PM -0400, Angus Berry wrote:
> Ahhh... thank you. This clarifies TOAST for me. I see how TOAST applies
> to individual columns that exceed the 8k page size.
>
> Postgres specs state it's possible to have 2GB rows and up to 1,600
> columns. Can you tell me what data type would get to fill this spec. I
> wouldn't normally push to this limit, but I am expecting to have to
> defend Postgres specs. to a 3rd party.

Any variable length datatype might be able to go to 2GB. Things like
text, char, varchar and bytea are the obvious ones. Arrays too IIRC.

However, as pointed out, even a toasted field takes about 20 bytes,
which means you're limited to maybe 400 toasted fields. If you use
integers you can get to 1600.

Normally however, in cases where you need to store a lot of columns,
what you really want is an array. You could easily store an array with
a few million numerics in a single field...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: "Harald Armin Massa"
Date:
Subject: Re: Best security practices for installing pgSQL with my software
Next
From: ptjm@interlog.com (Patrick TJ McPhee)
Date:
Subject: Re: are there static variables in pgsql?