Migrazioni database zero-downtime in pratica
· 25 min di lettura
Le modifiche schema in produzione richiedono expand-and-contract: forma compatibile prima, migrazione dati e comportamento, switch letture con evidenza, poi rimozione vecchi percorsi.Le modifiche schema in produzione richiedono expand-and-contract: forma compatibile prima, migrazione dati e comportamento, switch letture con evidenza, poi rimozione vecchi percorsi.
Assume deployments and clients overlap
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Expand without changing meaning
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Treat backfill as a production operation
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Move reads deliberately behind flags
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Contract only after evidence
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Supabase and managed Postgres constraints
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Observability and rollback that match reality
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Operational checklist for zero-downtime migrations
Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract. Definire metriche e stop per fase. Indice concurrent su tabelle grandi. Limitare batch backfill sotto carico. Esaminare mismatch shadow read prima switch. Letture campi deprecated a zero prima contract.
Domande frequenti
Quando big-bang?
Quanto dual-write?
Supabase garantisce DDL zero downtime?
Rollback con DROP?
Fonti
- PostgreSQL — CREATE INDEX CONCURRENTLY (in inglese) — postgresql.org
- PostgreSQL — ALTER TABLE (in inglese) — postgresql.org
- Supabase — Database migrations (in inglese) — supabase.com
- Stripe — Online migrations (in inglese) — stripe.com
Pagine correlate su questo sito
Servizio correlato
Backend, API e infrastruttura
API, storage, auth, osservabilità e infrastruttura cloud sotto traffico reale.
Pubblicato il 5 giugno 2024 da Berktug Berke Ates.