Adding a new column is one of the most common schema changes in modern databases. Done right, it is fast, safe, and easy to roll out. Done wrong, it can lock tables, block writes, and bring down production.
First, define exactly what the new column will store. Decide on its data type, default value, and whether it should allow NULLs. Every choice has performance and storage costs. A poorly chosen type can double memory usage under load.
Second, choose the right method for adding the column. In PostgreSQL, ALTER TABLE ADD COLUMN is simplest, but large tables can cause long locks if you set defaults that require rewriting the entire table. Use ADD COLUMN without default first, then update in small batches. In MySQL, check if the engine supports instant DDL for your schema.
Third, plan for backfill and deployment. Push the schema change first. Backfill data in isolated transactions to avoid locking. Add indexes only after the column is fully populated. Stagger deployments to match replication lag and failover strategy.