Is it possible to move data to the new table sourcing other tables without losing progress in the middle?
I think of
plpgsql that read data by chunks and commit after every N inserts... If the process stops in the middle the condition
NOT EXISTS (...) allows to add missing data by repeating process again.
I think it is important pattern and there might be support for it directly with the syntax:
INSERT INTO ... SELECT ... WHERE ... AND NOT EXISTS (...)
The reason for copying interruption can be a constraint or user pause an operation. Still we want not to lose progress and resume process (with a help of
NOT EXISTS (...) guard).