pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Angus Berry <angus.berry@elkenserve.com>
Cc: pgsql-general@postgresql.org
Subject: Re: TOAST not working
Date: Mon, 12 Jun 2006 12:07:03 +0200
Message-ID: <20060612100703.GB3829@svana.org> (raw)
In-Reply-To: <1149993782.15368.62.camel@vaio1linux>
References: <1149944622.15368.38.camel@vaio1linux>
	<87bqt03efl.fsf@wolfe.cbbrowne.com>
	<1149993782.15368.62.camel@vaio1linux>

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.

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (9+ messages)

Message-ID: <20060612100703.GB3829@svana.org>
Permalink:  ../20060612100703.GB3829@svana.org/
Also on:    postgresql.org/message-id/20060612100703.GB3829@svana.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: kleptog@svana.org, angus.berry@elkenserve.com, pgsql-general@postgresql.org
  Subject: Re: TOAST not working
  In-Reply-To: <20060612100703.GB3829@svana.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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