I'd assumed that that was a property that was being inherited from the parent table, but apparently the TABLESPACE flag to CREATE TABLE is completely ignored for the parent table. I know the documentation states that you can set the tablespace per child table, but accepting the flag on the parent and completely ignoring it seems rather misleading to me.
keith@keith=# CREATE TABLE XXXX(YYYYYY TIMESTAMP NOT NULL) PARTITION BY RANGE (YYYYYY ) TABLESPACE mytablespace;
yyyyyy | timestamp without time zone | | not null | | plain | |
Partition key: RANGE (yyyyyy)
keith@keith=# select relname, reltablespace from pg_class where relname = 'xxxx';
relname | reltablespace
---------+---------------
xxxx | 0
(1 row)
Any chance of this being an inheritable property that can simply be overridden if the TABLESPACE flag is set when creating a child table? If it's not set, just set the tablespace to whatever was set for the parent.
For now, partman is going to have to rely on the template table option to handle this the same way it does for indexes right now.