pull down to refresh
100 sats \ 1 reply \ @optimism 7h \ parent \ on: Make massive DB migrations fast II: batch, unlogged tables, defer constraints devs
Ah! Okay, yeah. In the past (90s, lol) I've done, once:
- Batch without constraints & test
- Double inserts into old and new (slows live down a bit but doesn't have to be a big deal)
- Batch with constraints for whatever gap is left
- Switchover with grace
- Disable double inserts
But tbh the double inserts thing was a lot of effort for not having a 10 minute or so downtime gap - this was on a callcenter like 911, so we thought it was worth it - but if I'd ever be asked again I'd stress the question: "are you sure you can't have downtime"?