Adding a new column is one of the most common changes in database schema evolution. It looks simple, but the execution can break production if done without planning. Whether the database is Postgres, MySQL, or another relational system, the approach needs to minimize downtime, lock contention, and risk to data integrity.
First, define the purpose and constraints of the new column. Decide on the data type, whether it should allow NULLs, and if it needs a default value. Setting a default on a large table can lock it for the duration of the write. In high-traffic systems, it is safer to add the new column as nullable, then backfill data in batches. Once the column is populated, adjust constraints and indexing.
For indexed columns, consider creating the index concurrently if supported. This prevents blocking reads and writes. Also, assess the effect on replication lag. Large schema changes can slow replication and cause stale reads in read replicas.