Adding a new column sounds simple. In practice, it can lock tables, block writes, and bring production to a halt. The risk grows with table size, query load, and the database engine in use. A naïve approach—ALTER TABLE ADD COLUMN—may seem harmless in a test database. At scale, it can cause downtime measured in minutes or hours.
The safest way to add a new column to a large production table is to use an online schema change process. Tools like pt-online-schema-change or gh-ost can create a shadow copy of the table, add the new column there, and migrate data without locking reads and writes. This avoids the blocking DDL problem and keeps your service responsive.
For databases that support it, such as PostgreSQL with ADD COLUMN and a default that is NULL, you can add the column instantly. Avoid defaults that require backfilling the entire table in one transaction. Instead, add the column without a value, then update in small batches, controlling transaction size and I/O.