Support specify tablespace for each merged/split partition - Mailing list pgsql-hackers

From Junwang Zhao
Subject Support specify tablespace for each merged/split partition
Date
Msg-id CAEG8a3KkzOqHushYhkMEpVvGiahLRPyEQu7VetUyMdbo30v+4w@mail.gmail.com
Whole thread Raw
Responses Re: Support specify tablespace for each merged/split partition
List pgsql-hackers
In [1], it is suggested that it might be a good idea to support
specifying the tablespace for each merged/split partition.

We can do the following after this feature is supported:

CREATE TABLESPACE tblspc LOCATION '/tmp/tblspc';
CREATE TABLE t (i int PRIMARY KEY) PARTITION BY RANGE (i);
CREATE TABLE tp_0_1 PARTITION OF t FOR VALUES FROM (0) TO (1);
CREATE TABLE tp_1_2 PARTITION OF t FOR VALUES FROM (1) TO (2);

ALTER TABLE t MERGE PARTITIONS (tp_0_1, tp_1_2) INTO tp_0_2 TABLESPACE tblspc;

ALTER TABLE t SPLIT PARTITION tp_0_2 INTO
    (PARTITION tp_0_1 FOR VALUES FROM (0) TO (1) TABLESPACE tblspc,
    PARTITION tp_1_2 FOR VALUES FROM (1) TO (2));

[1] https://www.postgresql.org/message-id/abaf390b-3320-40a5-8815-ef476db5cfe7@oss.nttdata.com

-- 
Regards
Junwang Zhao

Attachment

pgsql-hackers by date:

Previous
From: Антуан Виолин
Date:
Subject: Re: Extension for PostgreSQL cast jsonb to hstore WIP
Next
From: Ashutosh Bapat
Date:
Subject: Re: Optimize WindowAgg's use of tuplestores