Adding a new column is one of the most common schema changes, yet it can be one of the riskiest in production. Whether you work with PostgreSQL, MySQL, or any other relational database, the wrong approach can lock tables, trigger downtime, or break dependent systems. A careless ALTER TABLE can block writes, stall reads, and cascade failures through your stack.
The best approach begins with clarity on the definition: a new column is a new field added to a table to store additional data. The operation seems simple—ALTER TABLE ... ADD COLUMN—but the mechanics matter. The storage engine must rewrite rows or adjust metadata. On small tables, this is trivial. On large, high-traffic tables, this can be an operational event.
Before adding a new column, inspect row count, indexes, and replication lag. In PostgreSQL, adding a nullable column without a default is metadata-only and nearly instant. Adding a column with a default requires a full rewrite, which can crush performance. In MySQL, adding a new column may lock the table depending on storage engine and MySQL version. Use ALGORITHM=INSTANT where possible, and have rollback strategies.