Re: Attached partition not considering altered column properties of root partition.

2019-07-30 Thread Amit Langote
On Wed, Jul 31, 2019 at 2:38 AM Robert Haas wrote: > > On Tue, Jul 2, 2019 at 9:53 PM Amit Langote wrote: > > Thanks for the report. This seems like a bug. Documentation claims > > that the child tables inherit column storage options from the parent > > table. That's actually enforced in only

Re: Attached partition not considering altered column properties of root partition.

2019-07-30 Thread Robert Haas
On Tue, Jul 2, 2019 at 9:53 PM Amit Langote wrote: > Thanks for the report. This seems like a bug. Documentation claims > that the child tables inherit column storage options from the parent > table. That's actually enforced in only some cases. I realize I'm just repeating the same argument

Re: Attached partition not considering altered column properties of root partition.

2019-07-29 Thread Amit Langote
Hi Alvaro, Thanks for looking at this. On Sat, Jul 27, 2019 at 8:38 AM Alvaro Herrera wrote: > Thanks for the patch! > > I'm not completely sold on back-patching this. Should we consider > changing it in 12beta and up only, or should we just backpatch it all > the way back to 9.4? It's going

Re: Attached partition not considering altered column properties of root partition.

2019-07-26 Thread Alvaro Herrera
On 2019-Jul-03, Amit Langote wrote: > Thanks for the report. This seems like a bug. Documentation claims > that the child tables inherit column storage options from the parent > table. That's actually enforced in only some cases. > To fix this, MergeAttributesIntoExisting() should check that

Re: Attached partition not considering altered column properties of root partition.

2019-07-03 Thread Prabhat Sahu
Thanks Amit for the fix patch, I have applied the patch and verified the issue. The attached partition with altered column properties shows error as below: postgres=# alter table p attach partition p2 for values in (2); psql: ERROR: child table "p2" has different storage option for column "b"

Re: Attached partition not considering altered column properties of root partition.

2019-07-02 Thread Amit Langote
Hi Prabhat, On Tue, Jul 2, 2019 at 5:12 PM Prabhat Sahu wrote: > > Hi, > > In below testcase when I changed the staorage option for root partition, > newly attached partition not including the changed staorage option. > Is this an expected behavior? Thanks for the report. This seems like a

Attached partition not considering altered column properties of root partition.

2019-07-02 Thread Prabhat Sahu
Hi, In below testcase when I changed the staorage option for root partition, newly attached partition not including the changed staorage option. Is this an expected behavior? postgres=# CREATE TABLE tab1 (c1 INT, c2 text) PARTITION BY RANGE(c1); CREATE TABLE postgres=# create table tt_p1 as