(no title)
scient | 2 years ago
I've ran into an integer PK being almost exhausted in values twice now. In one of these cases I used pg-osc to rewrite a 8TB table on disk without downtime over a period of a week to fix the issue. In the other case it was about 6TB within 2 days. Its doable, but the amount of planning and time it takes is non-trivial.
I so far have no found any other viable solutions either. I keep hearing about logical replication but I haven't seen a great real-world solution at scale so far.
semiquaver|2 years ago
- decouple migration execution from code deployment. Require that all migrations are in totally separate PRs can be run well-in-advance of the code that depends on the db change being run
- maintain a stateful migration execution system using an online schema change system supervised by DBAs
- PRs adding migrations still need to be merged and deployed, but can only do so after the actual migration has run.
tianzhou|2 years ago