A new column is one of the smallest changes in a database, yet it can break an entire deployment if handled wrong. Adding it in production means dealing with schema locks, version drift, and queries that may return null where your code expects data. Doing it right requires more than running ALTER TABLE. It requires careful planning, backward-compatible releases, and a safe rollout process.
When adding a new column, start by making the schema change in a non-blocking way. Use ADD COLUMN without default values on large tables to avoid locking writes. Apply the change in a migration already deployed to all nodes before writing or reading from it in the application. This ensures that old code and new code can run side by side without errors.
Backfill data in small batches if the column needs seeded values. Avoid a single transaction that updates millions of rows at once. Use scheduling or throttling to keep load under control. Monitor execution time, I/O, and replication lag. Verify performance before turning on application logic that depends on the column.