Adding a new column sounds simple, but the wrong approach can lock tables, stall services, and cascade into outages. The right method depends on your database, the size of your data, and your tolerance for deployment risk.
In PostgreSQL, ALTER TABLE ADD COLUMN is fast for default null values but can become expensive if you set a non-null default on large tables. In MySQL, online DDL can help, but it needs configuration and may still block reads depending on the engine and schema changes. For column additions in production at scale, strategies like rolling schema updates, shadow tables, or feature flags are essential to keep services running while the database changes under them.
Plan every schema migration. First, determine if the column should be nullable during the initial add, then backfill data in small batches. Add constraints and defaults only after the backfill completes. For columns with computed data, use materialized views or background jobs to avoid heavy locks.