Adding a new column is one of the most common schema changes in production systems. Done right, it’s low-risk and fast. Done wrong, it can freeze writes, bloat storage, or lock entire tables. The key is knowing how your database handles schema migrations and planning for the scale you operate at.
In relational databases like PostgreSQL and MySQL, ALTER TABLE ADD COLUMN is straightforward for small tables. For large datasets, however, even simple changes can trigger full table rewrites or lock the table for longer than your tolerance allows. Always check the version-specific behavior and whether the operation is metadata-only.
For PostgreSQL, adding a column with a default value before version 11 rewrites the table. Since v11, you can add the column with a constant default without a full rewrite, but setting non-constant defaults or adding indexes later still requires careful planning. For MySQL, the impact depends on table engine and schema change algorithm support—ALGORITHM=INPLACE or ALGORITHM=INSTANT can drastically reduce downtime.