Re: Native partitioning tablespace inheritance

2018-04-13 Thread Michael Paquier
On Fri, Apr 13, 2018 at 08:23:22PM +0300, Evgeniy Shishkin wrote: >> On Apr 13, 2018, at 20:01, Robert Haas wrote: >> >> Well, let me put it this way. Someone who assumes that partitioning >> works like inheritance except where we've explicitly made it work >> differently

Re: Native partitioning tablespace inheritance

2018-04-13 Thread Evgeniy Shishkin
> On Apr 13, 2018, at 20:01, Robert Haas wrote: > > Well, let me put it this way. Someone who assumes that partitioning > works like inheritance except where we've explicitly made it work > differently will be correct. Someone who assumes something else will > be

Re: Native partitioning tablespace inheritance

2018-04-13 Thread Robert Haas
On Thu, Apr 12, 2018 at 3:55 PM, Keith Fiske wrote: > Your last example is why I proposed taking the TABLESPACE defined on the > parent and applying it to the children. Then all the children have one > defined and nothing breaks as long as all tablespaces are properly

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Michael Paquier
On Thu, Apr 12, 2018 at 03:39:19PM -0400, Robert Haas wrote: > Well I don't object to updating the documentation, but just because > something isn't what the user expects doesn't make it a bug. Users > can have arbitrary expectations. Yes, I agree that this is not a bug, and should not be

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Keith Fiske
On Thu, Apr 12, 2018 at 3:39 PM, Robert Haas wrote: > On Thu, Apr 12, 2018 at 3:15 PM, Jonathan S. Katz > wrote: > > Behavior-wise it’s certainly a bug: you add a TABLESPACE on the parent > > table, and that property is not passed down to

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Robert Haas
On Thu, Apr 12, 2018 at 3:15 PM, Jonathan S. Katz wrote: > Behavior-wise it’s certainly a bug: you add a TABLESPACE on the parent > table, and that property is not passed down to the children, which is not > what the user expects. At a minimum, if we don’t back

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Keith Fiske
On Thu, Apr 12, 2018 at 3:15 PM, Jonathan S. Katz < jonathan.k...@excoventures.com> wrote: > > > On Apr 12, 2018, at 3:10 PM, Alvaro Herrera > wrote: > > > > Robert Haas wrote: > >> On Thu, Apr 12, 2018 at 2:40 PM, Jonathan S. Katz > >>

Native partitioning tablespace inheritance

2018-04-12 Thread David G. Johnston
On Thursday, April 12, 2018, Robert Haas wrote: > On Thu, Apr 12, 2018 at 2:40 PM, Jonathan S. Katz > wrote: > > If there are no strong objections I am going to add this to the “Older > Bugs” > > section of Open Items in a little bit. > > I

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Robert Haas
On Thu, Apr 12, 2018 at 3:10 PM, Alvaro Herrera wrote: > Robert Haas wrote: >> On Thu, Apr 12, 2018 at 2:40 PM, Jonathan S. Katz >> wrote: >> > If there are no strong objections I am going to add this to the “Older >> > Bugs” >> > section

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Apr 12, 2018 at 2:40 PM, Jonathan S. Katz > wrote: > > If there are no strong objections I am going to add this to the “Older Bugs” > > section of Open Items in a little bit. > > I strongly object. This is not a bug. The TABLESPACE

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Robert Haas
On Thu, Apr 12, 2018 at 2:40 PM, Jonathan S. Katz wrote: > If there are no strong objections I am going to add this to the “Older Bugs” > section of Open Items in a little bit. I strongly object. This is not a bug. The TABLESPACE clause doing exactly what it was

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Jonathan S. Katz
> On Apr 12, 2018, at 2:36 PM, Christophe Pettus wrote: > > >> On Apr 12, 2018, at 09:17, Robert Haas wrote: >> Hmm, that's interesting. So you want the children to inherit the >> parent's tablespace when they are created, but if the parent's >>

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Christophe Pettus
> On Apr 12, 2018, at 09:17, Robert Haas wrote: > Hmm, that's interesting. So you want the children to inherit the > parent's tablespace when they are created, but if the parent's > tablespace is later changed, the existing children don't move? +1 to that behavior.

Re: Native partitioning tablespace inheritance

2018-04-12 Thread Robert Haas
On Wed, Apr 11, 2018 at 9:55 PM, David Rowley wrote: > 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

Re: Native partitioning tablespace inheritance

2018-04-11 Thread David Rowley
On 12 April 2018 at 09:19, Keith Fiske 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

Re: Native partitioning tablespace inheritance

2018-04-11 Thread Peter Eisentraut
On 4/11/18 17:19, Keith Fiske 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

Re: Native partitioning tablespace inheritance

2018-04-11 Thread Keith Fiske
On Wed, Apr 11, 2018 at 4:54 PM, Michael Paquier wrote: > On Wed, Apr 11, 2018 at 12:52:06PM -0400, Keith Fiske wrote: > > Any chance of this being an inheritable property that can simply be > > overridden if the TABLESPACE flag is set when creating a child table? If > >

Re: Native partitioning tablespace inheritance

2018-04-11 Thread Michael Paquier
On Wed, Apr 11, 2018 at 12:52:06PM -0400, Keith Fiske wrote: > Any chance of this being an inheritable property that can simply be > overridden if the TABLESPACE flag is set when creating a child table? If > it's not set, just set the tablespace to whatever was set for the parent. I am wondering

Native partitioning tablespace inheritance

2018-04-11 Thread Keith Fiske
Just had someone report that pg_partman wasn't handling tablespaces for native partitioning. https://github.com/keithf4/pg_partman/issues/212 I'd assumed that that was a property that was being inherited from the parent table, but apparently the TABLESPACE flag to CREATE TABLE is completely