Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8124A475B8D for ; Sun, 3 Nov 2002 21:20:33 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id E5F11475AFF for ; Sun, 3 Nov 2002 21:20:32 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id gA42JshR025509; Sun, 3 Nov 2002 21:19:54 -0500 (EST) To: Stephan Szabo Cc: pilsl@goldfisch.at, Doug McNaught , pgsql-general@postgresql.org Subject: Re: 7.2.3: tuple is too big (max 8136) In-reply-to: <20021103162643.V91168-100000@megazone23.bigpanda.com> References: <20021103162643.V91168-100000@megazone23.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Sun, 03 Nov 2002 16:38:45 -0800" Date: Sun, 03 Nov 2002 21:19:54 -0500 Message-ID: <25508.1036376394@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/100 X-Sequence-Number: 32522 Stephan Szabo 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