pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: pilsl@goldfisch.at, Doug McNaught <doug@mcnaught.org>
Cc: pgsql-general@postgresql.org
Subject: Re: 7.2.3: tuple is too big (max 8136)
Date: Sun, 03 Nov 2002 21:19:54 -0500
Message-ID: <25508.1036376394@sss.pgh.pa.us> (raw)
In-Reply-To: <20021103162643.V91168-100000@megazone23.bigpanda.com>
References: <20021103162643.V91168-100000@megazone23.bigpanda.com>

Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> Technically there is still a tuple size limit.  It's just that many types
> can be pulled out of the main storage of the table and you get a reference
> to its value in the main storage rather than the value itself.  That's how
> the 8k limit was circumvented.  The tuple size limit is part of why
> there's a maximum column count, AFAIK the main tuple still needs to fit in
> one page.

Right.  You could fit 1600 int4 columns (6400 bytes total), but not 1600
int8 columns.  TOAST pointer entries are 20 bytes each, so if all your
columns are toastable types (like varchar) then the upper limit would be
about 400 columns.

In practice, performance will probably suck with more than a couple
hundred columns anyway.  You'd be better off rethinking your database
design.

			regards, tom lane



view thread (6+ messages)

Message-ID: <25508.1036376394@sss.pgh.pa.us>
Permalink:  ../25508.1036376394@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25508.1036376394@sss.pgh.pa.us

 · 

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sszabo@megazone23.bigpanda.com, doug@mcnaught.org, pgsql-general@postgresql.org
  Subject: Re: 7.2.3: tuple is too big (max 8136)
  In-Reply-To: <25508.1036376394@sss.pgh.pa.us>

* 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