I have a large table that needs converting to the native partitioning available in PG10. I'm looking for a strategy to safely move the data. I was considering a CREATE TABLE new LIKE old PARTITION ON(my_timestamp). But I figured postgres would execute that before I could create the child tables. Does the new table and all of it;s child tables need to be created first and then move the data over?
If I use the strategy of creating the new table and child tables, is it faster to directly populate the child tables with data or copy the data in to the new table and let the native partitioning move the data to the correct child partition?
One other question. My table gets updated every minute. I use a trigger to add a subset of some of the data to another table. Will that still work?
Thanks in advance,