Re: Native partitioning tablespace inheritance

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Native partitioning tablespace inheritance
Date: 2018-04-12 01:55:37
Message-ID: CAKJS1f9PXYcT+j=oyL-Lquz=ScNwpRtmD7u9svLASUygBdbN8w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12 April 2018 at 09:19, Keith Fiske <keith(dot)fiske(at)crunchydata(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-04-12 02:12:16 Re: [HACKERS] path toward faster partition pruning
Previous Message Kyotaro HORIGUCHI 2018-04-12 01:34:30 Re: Problem while setting the fpw with SIGHUP