Adding a new column to a production database seems simple until you measure the impact. In PostgreSQL, ALTER TABLE ADD COLUMN runs fast for nullable fields without defaults, but can lock the table for writes in certain cases. In MySQL, storage engines and row formats determine if the change is instant or blocking. Even small schema changes can cascade into index rebuilds, cache invalidations, and ORM mismatches.
The best approach is planned execution. First, check database load and replication lag. Use a migration tool that supports online DDL, such as gh-ost or pg_online_schema_change, to keep uptime. Add the column with a NULL default. Backfill in small batches to avoid spikes. Then apply constraints or indexes in separate steps.
In distributed systems, apply the new column in a backward-compatible way. Deploy application code that does not yet depend on the column. Write data into both old and new structures until replication is confirmed. Only then switch reads to the new column and remove legacy code.