Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 204832E0030 for ; Fri, 23 May 2008 17:09:08 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06744-04 for ; Fri, 23 May 2008 17:09:02 -0300 (ADT) X-Greylist: delayed 00:26:38.44722 by SQLgrey-1.7.6 Received: from smtp.tcdi.com (smtp.tcdi.com [66.162.198.103]) by developer.postgresql.org (Postfix) with ESMTP id A603C2E002E for ; Fri, 23 May 2008 17:09:04 -0300 (ADT) Received: by smtp.tcdi.com (Postfix, from userid 1001) id EE2AB2CEB9C; Fri, 23 May 2008 15:42:24 -0400 (EDT) Received: from smtp.tcdi.com (localhost [127.0.0.1]) by smtp.tcdi.com (Postfix) with ESMTP id 8461C2CEB62 for ; Fri, 23 May 2008 15:42:24 -0400 (EDT) Received: from tcdiexch2k3.tcdi.com (unknown [66.162.198.126]) by smtp.tcdi.com (Postfix) with ESMTP for ; Fri, 23 May 2008 15:42:24 -0400 (EDT) Message-ID: <48371C8A.7000206@tcdi.com> Date: Fri, 23 May 2008 15:35:38 -0400 From: Mike Weber User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: 1600 column limit per table Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 May 2008 19:42:11.0850 (UTC) FILETIME=[18365EA0:01C8BD0D] X-AV-Checked: ClamAV using ClamSMTP on smtp.tcdi.com X-Sanitizer: This message has been sanitized! X-Sanitizer-URL: http://mailtools.anomy.net/ X-Sanitizer-Rev: $Id: Sanitizer.pm,v 1.89 2004/09/02 10:14:15 bre Exp $ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200805/209 X-Sequence-Number: 29293 I ran into the 1600 column upper bound in a table and I am trying to assess if I can work around the limit or if I am in need of a re-design of my application. All the documentation on the site that I have seen (CREATE TABLE and postgresql.org/about/) says that 1600 is the limit, I looked in htup.h and found: ./src/include/access/htup.h:#define MaxHeapAttributeNumber 1600 /* 8 * 200 */ with documentation to explain the limitation. The one ray of hope I found was a post from 2001(!) suggesting that the maximum number of columns can be increased 4x by increasing one's block size to 32k ( http://archives.postgresql.org/pgsql-admin/2001-01/msg00199.php ) One thought I had was to join two 1600 column tables but ran into the limit of 1664 tuples. I'm currently using 8.1.10 -- are there any easy outs(via upgrade, configuration, or hacking postgres a little) or should I start drawing up a different application design? Thanks, Mike