On the documentation there is an example for upgrading timescaledb for primary key
Is it realy necessary to export then reimport on a temporary table ?
why not directly import data from the old table
Can someone explain ?
Thanks
-Stephane
Is it realy necessary to export then reimport on a temporary table ?
Code:
\copy temp_history_uint FROM '/tmp/history_uint.csv' DELIMITER ',' CSV
-- Create hypertable and populate it select create_hypertable('history_uint', 'clock', chunk_time_interval => 86400, migrate_data => true);
INSERT INTO history_uint SELECT * FROM temp_history_uint ON CONFLICT (itemid,clock,ns) DO NOTHING;
Code:
INSERT INTO history_uint SELECT * FROM history_uint_old ON CONFLICT (itemid,clock,ns) DO NOTHING;
Thanks
-Stephane
Comment