From: | "Amit Langote" <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | "'Robert Haas'" <robertmhaas(at)gmail(dot)com>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com> |
Cc: | "'Amit Kapila'" <amit(dot)kapila16(at)gmail(dot)com>, "'Alvaro Herrera'" <alvherre(at)2ndquadrant(dot)com>, "'Bruce Momjian'" <bruce(at)momjian(dot)us>, "'Pg Hackers'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: On partitioning |
Date: | 2014-12-11 00:25:45 |
Message-ID: | 010c01d014d9$00fddbc0$02f99340$@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
> On Mon, Dec 8, 2014 at 2:56 PM, Andres Freund
> <andres(at)2ndquadrant(dot)com> wrote:
> >> I don't think that's mutually exclusive with the idea of
> >> partitions-as-tables. I mean, you can add code to the ALTER TABLE
> >> path that says if (i_am_not_the_partitioning_root) ereport(ERROR, ...)
> >> wherever you want.
> >
> > That'll be a lot of places you'll need to touch. More fundamentally: Why
> > should we name something a table that's not one?
>
> Well, I'm not convinced that it isn't one. And adding a new relkind
> will involve a bunch of code churn, too. But I don't much care to
> pre-litigate this: when someone has got a patch, we can either agree
> that the approach is OK or argue that it is problematic because X. I
> think we need to hammer down the design in broad strokes first, and
> I'm not sure we're totally there yet.
>
In heap_create(), do we create storage for a top level partitioned table (say, RELKIND_PARTITIONED_TABLE)? How about a partition that is further sub-partitioned? We might allocate storage for a partition at some point and then later choose to sub-partition it. In such a case, perhaps, we would have to move existing data to the storage of subpartitions and deallocate the partition's storage. In other words only leaf relations in a partition hierarchy would have storage. Is there such a notion within code for some other purpose or we'd have to invent it for partitioning scheme?
Thanks,
Amit
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2014-12-11 01:14:34 | Re: logical column ordering |
Previous Message | Tom Lane | 2014-12-11 00:07:49 | Re: thinko in convertToJsonb() |