Re: Auto creation of Partitions - Mailing list pgsql-hackers

From Shane Ambler
Subject Re: Auto creation of Partitions
Date
Msg-id 45F06DB5.1010207@Sheeky.Biz
Whole thread Raw
In response to Re: Auto creation of Partitions  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Auto creation of Partitions  (NikhilS <nikkhils@gmail.com>)
List pgsql-hackers
> Note to Nikhil: Make sure the new syntax doesn't prevent partitions from
> being placed upon multiple tablespaces in some manner, at CREATE TABLE
> time.

What if the syntax was something like -

CREATE TABLE tabname (    ...    ... ) PARTITION BY HASH(expr)
| RANGE(expr)
| LIST(expr)
[PARTITIONS num_partitions] /* will apply to HASH only for now*/
[PARTITION partition_name CHECK(...) [USING TABLESPACE tblspcname], PARTITION partition_name CHECK(...) [USING
TABLESPACEtblspcname] ...
 
];


And (if we use the ALTER TABLE to add partitions)

ALTER TABLE tabname
ADD PARTITION partition_name CHECK(...)
[USING TABLESPACE tblspcname];


Of course ALTER TABLE childtable SET TABLESPACE tblspcname; should not 
cause any probs.


-- 

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz


pgsql-hackers by date:

Previous
From: Doug Knight
Date:
Subject: Re: [PATCHES] pg_standby
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Estimating seq_page_fetch and random_page_fetch