Skip to content
Blog

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?
Tabelle piccole, traffico basso, downtime accettata, restore testato.Tabelle piccole, traffico basso, downtime accettata, restore testato.Tabelle piccole, traffico basso, downtime accettata, restore testato.Tabelle piccole, traffico basso, downtime accettata, restore testato.Tabelle piccole, traffico basso, downtime accettata, restore testato.Tabelle piccole, traffico basso, downtime accettata, restore testato.
Quanto dual-write?
Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.Solo per backfill/validazione, con data fine.
Supabase garantisce DDL zero downtime?
No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.No—lock e IO restano responsabilità vostra.
Rollback con DROP?
Di solito no—prima traffico, DROP in deploy calmo.Di solito no—prima traffico, DROP in deploy calmo.Di solito no—prima traffico, DROP in deploy calmo.Di solito no—prima traffico, DROP in deploy calmo.Di solito no—prima traffico, DROP in deploy calmo.

Fonti

Servizio correlato

API, storage, auth, osservabilità e infrastruttura cloud sotto traffico reale.

Vai alla pagina di ingaggio


Pubblicato il 5 giugno 2024 da Berktug Berke Ates.