How use create partition table based on Cstore ?

167 views
Skip to first unread message

Sylar Guo

unread,
Apr 1, 2016, 4:04:15 AM4/1/16
to cstore users
Hi I would like to create a partition table base on CSTORE as below:
CREATE FOREIGN TABLE test.test_partition_table (
    id INT,
    ym CHAR(6)
)
SERVER cstore_server
OPTIONS (compression 'pglz'
);

CREATE TABLE test.test_partition_table_201603 (
    CHECK ( ym >= '201603' AND ym < DATE '201604' )
)
    INHERITS (test.test_partition_table);

However I encounter such error: 
ERROR: inherited relation "test_partition_table" is not a table

How can I make it ?
Thanks!

Murat Tuncer

unread,
Apr 1, 2016, 6:51:45 AM4/1/16
to Sylar Guo, cstore users
Hey Sylar

Please change the child table definition into something like following. Differences from your original definition is underlined


CREATE FOREIGN TABLE test.test_partition_table_201603 (
    CHECK ( ym >= '20160301' AND ym < '20160401')
)
INHERITS (test.test_partition_table)
SERVER cstore_server 
OPTIONS (compression 'pglz');

--
You received this message because you are subscribed to the Google Groups "cstore users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cstore-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Murat Tuncer
Software Engineer | Citus Data
mtu...@citusdata.com

Lucas Hamie

unread,
Apr 22, 2016, 5:27:47 PM4/22/16
to cstore users, twink...@gmail.com
Did you get a significant performance upgrade from partitioning?

I'm deciding if partitioning is woth it if i'm going to use pg_shard. 
Reply all
Reply to author
Forward
0 new messages