Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJQu1-00078l-W8 for pgsql-general@arkaria.postgresql.org; Wed, 24 Apr 2019 23:02:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJQu0-0005mU-Mt for pgsql-general@arkaria.postgresql.org; Wed, 24 Apr 2019 23:02:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJQu0-0005mN-B2 for pgsql-general@lists.postgresql.org; Wed, 24 Apr 2019 23:02:08 +0000 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJQty-0006Fu-6E for pgsql-general@lists.postgresql.org; Wed, 24 Apr 2019 23:02:07 +0000 Received: by mail-oi1-x241.google.com with SMTP id v7so15647427oie.8 for ; Wed, 24 Apr 2019 16:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=lz4pizdP6YmifwlHKzGXzIFE/ZNatb5cTDkRn59DqYc=; b=mk6xT3TxgIDATUuFJC4Y9ahza7UC0/hqbU3mzpxQej7v1QiFWoxuiIdfzWxUz3CvfA G9RtEiE+gSyGfpM7zZ//QU5ihN1XOd9XqTZ9BBJUDbGossD1qHLxcICN8nb7h9twkmqU TUYQNFCOAsnN1S6poIuqkYCTLPIiL56+6PP+9FX9nRHxELi639Hp6TwTSt2FFXceiBfg GZcBPbEWRA5dzfvEUMV+/eTbUg9ZVZ0bg6WbEsXsx0/D8z+kXLae1f7KUB2RPKYgWs/Q xvX7ABKrOra2ETlESEP5D4els9YdJMeAPAyWTulvlw8vYnnCe1Z/rfRPb3P6qQeakR9I CpFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=lz4pizdP6YmifwlHKzGXzIFE/ZNatb5cTDkRn59DqYc=; b=p32sc9IJp2nH5pc9AgpP/HxT6iT9fdGzdCz3W0cJs9REXHO5yieUG4gAUyt2Gafu25 sC47oliYbSMF1VUmiglpu78McyAuYLAK0uJltG3JVPJqVO8u/w3k9vcovaEy/jjUJgLH jbHT8a75MFfBgYlr6Yvb8FsAAoB+DcnmGXChQyTP7Y+hMKQKtlHGp2H6QI3/11NB8Ru7 w0qqlZKsN4ZxEnrEzXMGinx1DSZCJ6YSY7FnPpNVnRtUg8RkFLWKB2VQZE99npzH1NYL 8q85hjQ1eI0LFHkFUSKjSGeFeKMlXHgFvsvjk9occ8t+VS/WVjR6wjYBJBaR4VXTcJMn gQHw== X-Gm-Message-State: APjAAAVib1/c/uRc2462g34Ftre3RBIkD/X/D3+HA6x4nZ0xq+MSbj70 8hCFLzaDHub4XoopRN0dZeckRKA3Cuw= X-Google-Smtp-Source: APXvYqyDwFLY3majTJUF/nucREQcFJ1N6r3nFUPZ8SujDqf3HhrWqXo0Ar0EpqTDmvtU82WhYwYnlg== X-Received: by 2002:aca:e30f:: with SMTP id a15mr1080314oih.15.1556146923412; Wed, 24 Apr 2019 16:02:03 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id v19sm8447475otk.63.2019.04.24.16.02.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 16:02:02 -0700 (PDT) Subject: Re: how to add more than 1600 columns in a table? To: pgsql-general@lists.postgresql.org References: <20190424225519.GA8439@alvherre.pgsql> From: Ron Message-ID: Date: Wed, 24 Apr 2019 18:02:02 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190424225519.GA8439@alvherre.pgsql> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 4/24/19 5:55 PM, Alvaro Herrera wrote: > On 2019-Apr-24, pabloa98 wrote: > >> Regarding to (2), We are good by adding a patch and recompile a patched >> version for our server databases. >> >> But we are open on helping to add thousands of columns support as a >> compile-time parameter if there are other people interested. > It's hard to say what you're doing wrong when we don't know > what are you actually doing. > > I think raising the limit requires changing ItemIdData, t_hoff, and a > few members of PageHeaderData at the very least. Reading the three > header files involved carefully would probably point out areas I've > forgotten to mention. I think if you enlarge t_hoff and lp_off/lp_len > to 16 bits, you can use 64kB blocks, which might be useful too. > > Note that with pg12 you could have your own table AM that supported > wider ItemIds as a (small?) change on heapam, rather than supplant it > for all tables. That way you would only pay the (probably considerable) > cost of the wider line pointers on all tables ... Do views have the same 1600 column limit as tables? -- Angular momentum makes the world go 'round.