Search Postgresql Archives

Convert Existing Table to a Partition Table in PG10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
Clifford


--
@osm_seattle
OpenStreetMap: Maps with a human touch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux