Adding a new column to a database table should be straightforward. One command, one schema change, zero drama. But in production systems with live traffic, schema changes are a prime source of incidents. Downtime, lock contention, and unexpected query plan changes are common when adding columns in the wrong way.
A new column can be nullable, have a default value, or be generated. Each choice influences the storage engine, the replication lag, and the cost of backfilling data. In large datasets, a blocking alter can freeze writes for minutes or hours. That’s why engineers use online schema change tools, partitioned rollouts, or feature flags to control visibility.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for metadata-only additions, but adding a default with a non-null constraint rewrites the table. In MySQL, adding a column to the middle of a table is more expensive than appending it. In distributed systems like CockroachDB, the schema change runs asynchronously, which affects consistency guarantees.