Database Migration Strategy: Zero-Downtime Schema Changes in Postgres
Adding a column with a default is instant in Postgres 11+. Dropping a NOT NULL constraint still locks. A migration sequencing guide for high-traffic tables.
Adding a column with a default is instant in Postgres 11+. Dropping a NOT NULL constraint still locks. A migration sequencing guide for high-traffic tables.
Overview
This note is part of the field-notes archive generated for this site. The summary below is the published excerpt; you can expand the full write-up anytime in the CMS.
Related notes
Tags
- postgres
- migrations
- database
- zero-downtime
- production
Manish Bookreader
Electronics enthusiast, Embedded Systems Expert, Linux/Networking programmer, and Software Engineer passionate about AI, electronics, books, and cooking.