On 12 April 2018 at 09:19, Keith Fiske <keith.fi...@crunchydata.com> wrote:
> To me the current behavior is even more unintuitive. You tell it to put the
> parent table in a specific tablespace and it completely ignores the option
> and puts it in the default. Then when you go create children without
> specifying a tablespace, you don't see it going where you thought it would
> based on the parent's creation statement. Yes, you can tell each child where
> to go, but why not have at least a basic mechanism for setting a single
> tablespace value for a partition set into the parent itself the same way
> we're doing with indexes?
> If you set the tablespace you want a partition set to be in by setting that
> on that parent, I think that's pretty intuitive. If you want children to be
> in a different tablespace than the partition's default, then you can tell it
> that at child creation.
> Having to rely on custom written function to enforce just basic tablespace
> rules seems to be overcomplicating it to me.

I imagine the correct thing to do is properly record the TABLESPACE
option for the partitioned table then make child tables use that if
nothing else was specified.

This would allow the parent partition's tablespace to be changed from
time to time as disk partitions become full to allow the new
partitions to be created in the tablespace which sits on a disk with
the most free space.

 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Reply via email to