Re: [PATCHES] ADD/DROP INHERITS

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] ADD/DROP INHERITS
Date: 2006-06-10 17:06:58
Message-ID: 87r71xey8d.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Also a couple other thoughts:

I have a bit of uneasiness about the "use the first hole" method for adding
parents. Namely it makes the whole thing a bit unpredictable from the user's
point of view. The holes aren't user visible so they have no way to know when
they add a parent where in the list of parents it will appear.

And when you add something to a list don't you usually expect it to appear
last? It's not exactly least-surprise compliant to have it appearing in the
middle of the list of parents.

But perhaps it's just worth those downsides to keep DROP/ADD a noop in more
cases.

But on that note I'm starting to have second thoughts about the one-wayness of
attislocal->1. It means if you ever drop a partition all the columns will
become attislocal=1 forevermore, even if you re-add the partition. It also
means if you create partitions independently and then add them they behave
differently from if you create them as inherited tables.

I'm thinking that in the partitioned table use case this will get in the way
of dropping columns from a partitioned table. You'll essentially be forcing
users to drop the column manually from every child.

Maybe it would be better to set attislocal=0 if the attinhcount goes from
0->1?

Otherwise if we don't allow new columns to be created in ADD INHERIT then
we're forcing users to treat all their columns as locally defined.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Benny Amorsen 2006-06-10 17:29:13 Re: That EXPLAIN ANALYZE patch still needs work
Previous Message Tom Lane 2006-06-10 17:00:38 Re: ADD/DROP INHERITS

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2006-06-10 17:30:14 Re: ADD/DROP INHERITS
Previous Message Tom Lane 2006-06-10 17:00:38 Re: ADD/DROP INHERITS