X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EC1909FA430 for ; Mon, 12 Jun 2006 07:07:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 28736-09 for ; Mon, 12 Jun 2006 07:07:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.94.225]) by postgresql.org (Postfix) with ESMTP id C28C79FA42B for ; Mon, 12 Jun 2006 07:07:11 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1FpjK3-0001E6-5Z; Mon, 12 Jun 2006 20:07:03 +1000 Date: Mon, 12 Jun 2006 12:07:03 +0200 From: Martijn van Oosterhout To: Angus Berry Cc: pgsql-general@postgresql.org Subject: Re: TOAST not working Message-ID: <20060612100703.GB3829@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Angus Berry , pgsql-general@postgresql.org References: <1149944622.15368.38.camel@vaio1linux> <87bqt03efl.fsf@wolfe.cbbrowne.com> <1149993782.15368.62.camel@vaio1linux> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <1149993782.15368.62.camel@vaio1linux> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/447 X-Sequence-Number: 96819 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFEjTzHIB7bNG8LQkwRAm7nAJ9YszJQOsfFu/gyuwICrV9u3fTO4gCfVUc3 FmWGloeEoSu50HGVkC+QJWs= =JEnz -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--