Attached partition not considering altered column properties of root partition.

From: Prabhat Sahu <prabhat(dot)sahu(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Attached partition not considering altered column properties of root partition.
Date: 2019-07-02 08:11:47
Message-ID: CANEvxPobnOoF9pVyU3fMkGj8D0TMHAkGBbeQY5as8OBWPVan+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 select * from tab1 where 1=2;
SELECT 0
postgres=# alter table tab1 alter COLUMN c2 set storage main;
ALTER TABLE
postgres=#
postgres=# alter table tab1 attach partition tt_p1 for values from (20) to
(30);
ALTER TABLE
postgres=# \d+ tab1
Partitioned table "public.tab1"
Column | Type | Collation | Nullable | Default | Storage | Stats target
| Description
--------+---------+-----------+----------+---------+---------+--------------+-------------
c1 | integer | | | | plain |
|
c2 | text | | | | main |
|
Partition key: RANGE (c1)
Partitions: tt_p1 FOR VALUES FROM (20) TO (30)

postgres=# \d+ tt_p1
Table "public.tt_p1"
Column | Type | Collation | Nullable | Default | Storage | Stats
target | Description
--------+---------+-----------+----------+---------+----------+--------------+-------------
c1 | integer | | | | plain |
|
c2 | text | | | | extended |
|
Partition of: tab1 FOR VALUES FROM (20) TO (30)
Partition constraint: ((c1 IS NOT NULL) AND (c1 >= 20) AND (c1 < 30))
Access method: heap

--

With Regards,

Prabhat Kumar Sahu

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2019-07-02 08:16:22 Re: Add parallelism and glibc dependent only options to reindexdb
Previous Message Tomas Vondra 2019-07-02 08:03:22 Re: Increasing default value for effective_io_concurrency?