Convert Existing Table to a Partition Table in PG10

Поиск
Список
Период
Сортировка
От Clifford Snow
Тема Convert Existing Table to a Partition Table in PG10
Дата
Msg-id CADAoPLp9yGEF=o=E0DpTw2BKt=iT1ETwh-pcj2=2+gQsBPExsg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Convert Existing Table to a Partition Table in PG10
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Can PostgreSQL create new WAL files instead of reusing old ones?
Следующее
От: "Ravi Krishna"
Дата:
Сообщение: Re: Convert Existing Table to a Partition Table in PG10