4 points · by jhas78asd · 3y ago · 3 comments
In both cases, success or failure, before swapping a second time we needed to copy forward all the rows being inserted into the placeholder table.
Other disaster mitigations are capturing a dump of rows for the relevant partitions being modified with pg_dump. And having physical database backups with snapshots enabled and available if things really go wrong.