top | item 35889704

(no title)

jhas78asd | 2 years ago

We didn't write up our rollback plan, but here was the gist. Since we first had to remove the primary key from all children in order to add the conflicting composite primary key to the parent (that propagated to children), if we aborted the whole process, we'd then need to restore the single column PK on children again by creating the PKs we'd just removed.

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.

discuss

order

No comments yet.