From: Gavin Flower <GavinFlower@archidevsys.co.nz>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
To: pabloa98 <pabloa98@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: how to add more than 1600 columns in a table?
Date: Thu, 25 Apr 2019 11:13:10 +1200
Message-ID: <97894961-e759-a110-86d7-e5950c7d4ea7@archidevsys.co.nz> (raw)
In-Reply-To: <20190424225519.GA8439@alvherre.pgsql>
References: <20190424225519.GA8439@alvherre.pgsql>
On 25/04/2019 10:55, 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 ...
>
I wonder if it might prove a killer feature for some niche uses!
Stranger things have come to pass.
Suspect that going beyond 1600 columns would never be the default, even
if the pg core devs, were happy to allow it as an official option
(presumably at compile time?). As I think it would have negative
performance impacts on the most uses of pg - as Alvaro hinted at. IMnsHO
Certainly the will be many people intrigued as to what you are trying to
do, even if we never want to do the same ourselves.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: GavinFlower@archidevsys.co.nz, alvherre@2ndquadrant.com, pabloa98@gmail.com, mail@joeconway.com
Subject: Re: how to add more than 1600 columns in a table?
In-Reply-To: <97894961-e759-a110-86d7-e5950c7d4ea7@archidevsys.co.nz>
References: <20190424225519.GA8439@alvherre.pgsql> <97894961-e759-a110-86d7-e5950c7d4ea7@archidevsys.co.nz>
* 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