Re: Effect of dropping a partitioned table's column over time

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Effect of dropping a partitioned table's column over time
Date: 2017-08-07 20:05:21
Message-ID: CA+TgmoZ1q1fcenFuCDBwHx-071VyRw+t3WCjg2pxT_Rv9DQFaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 6, 2017 at 11:38 PM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> Can we instead create the new partitions with the same dropped columns?
>
> Ensure that every partition, parent and child, has the same column-set?

We could, but that has costs of its own. It means that those calls
are stored in the tuple as nulls, which means that there will be a
null bitmap where you wouldn't otherwise have one, and every time you
deform a tuple you'll have to worry about those columns even though
they're never used for anything.

It's not clear whether this cost is more or less than the tuple
conversion cost. It seems ugly to me, though, either way.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-08-07 20:07:00 Re: pgsql: Record full paths of programs sought by "configure".
Previous Message Andrew Dunstan 2017-08-07 19:58:02 Re: pgsql: Record full paths of programs sought by "configure".