Adding a new column in a live database is not a step to take lightly. Schema changes can break running services, stall queues, and corrupt data. The safest way is to design migrations that change the schema without blocking reads or writes.
First, confirm the column’s name, type, and nullability. If the column can be nullable, add it without a default. This avoids a table rewrite. For large tables, always use an ALTER TABLE with an operation supported as non-blocking by the database engine. In PostgreSQL, adding a nullable column with no default is instant. If you must set a default, add the column first, then backfill in batches.
Backfill scripts should run with controlled transaction sizes. Monitor locks, deadlocks, and slow queries during this step. Test the full migration path in staging with production-like data. Simulate read and write loads to ensure no downtime.