Attached partition not considering altered column properties of root partition. - Mailing list pgsql-hackers

From Prabhat Sahu
Subject Attached partition not considering altered column properties of root partition.
Date
Msg-id CANEvxPobnOoF9pVyU3fMkGj8D0TMHAkGBbeQY5as8OBWPVan+w@mail.gmail.com
Whole thread Raw
Responses Re: Attached partition not considering altered column properties ofroot partition.  (Amit Langote <amitlangote09@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Increasing default value for effective_io_concurrency?
Next
From: Julien Rouhaud
Date:
Subject: Re: Add parallelism and glibc dependent only options to reindexdb