The table waited, but the data had nowhere to go. You knew the schema was wrong the moment the request landed in your inbox. A feature needed state, history, or a counter. The answer: a new column.
Adding a new column sounds simple. It isn’t. Done wrong, it locks tables, blocks writes, or takes production offline. At scale, even a safe migration can stall under load. The steps matter.
First, decide if the new column is nullable or has a default value. Nullable columns are easier to add without locking because the database doesn’t have to rewrite every row. Defaults often trigger a full table rewrite—dangerous if the dataset is large. In PostgreSQL, adding a nullable column is fast. In MySQL, the version and table engine dictate whether the operation is instantaneous or blocking.
Second, batch your backfill. If you need initial values, avoid a single massive update. Use small transactions. Throttle the work. Keep indexes in mind—every write will also update the index structures.