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

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Effect of dropping a partitioned table's column over time
Date: 2017-08-07 03:25:11
Message-ID: CAEepm=3Hg3d7DNVZoo+KRf7V3ge3W1pWCLDdiG47Aum6+AkdzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 7, 2017 at 2:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
>> Since partitioned tables have no storage themselves, is there
>> any technical reason we couldn't remove a partitioned table's dropped
>> pg_attribute so that its TupleDesc matches partitions created later?
>
> You'd break views referring to the partitioned table, or at least to
> any columns after the dropped one.

I will put a huge sign up next to my desk: "What about the rules?"

> There's been talk of separating column identity (think OID) from column
> logical and physical positions. If we did that, and had Vars using the
> column identity number while tupdescs were sorted according to physical
> position, then what you're thinking of could be made to work. But a
> couple of people have attacked that problem and been unable to finish
> it :-(

Hmm, yeah I see. I have seen that[1] and I hope it comes back. It
seems like it might be a step on the path towards incremental
materialized views (at least in one proposal) which is why I asked
about it on this list recently[2].

[1] https://www.postgresql.org/message-id/flat/20141209174146(dot)GP1768(at)alvh(dot)no-ip(dot)org
[2] https://www.postgresql.org/message-id/flat/CAEepm%3D3ZHh%3Dp0nEEnVbs1Dig_UShPzHUcMNAqvDQUgYgcDo-pA%40mail.gmail.com

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-08-07 03:33:30 FYI: branch for v11 devel is planned for next week
Previous Message Amit Langote 2017-08-07 02:56:32 Re: scan on inheritance parent with no children in current session