Adding a new column is one of the most common changes in any database. It looks simple. One line in an ALTER TABLE statement. But done wrong, it can lock tables, block writes, and cause downtime. The key is to design, deploy, and backfill without harming performance or data integrity.
First, define the new column with the right data type. Consider nullability. If the column cannot be null, you need a default value strategy. In large datasets, adding a column with a default can rewrite the entire table, so split it into a fast metadata-only change, then run a background update.
Second, manage migrations. For SQL databases that support it, use online DDL features like ALTER TABLE ... ADD COLUMN with non-blocking options. In PostgreSQL, adding a nullable column is instant. In MySQL with InnoDB, choose ALGORITHM=INPLACE or INSTANT when possible. For columns that need indexes, build them after the data is loaded to reduce write amplification.