Adding a new column sounds simple. In practice, schema changes can lock rows, block writes, or stall key queries. The right approach keeps your database online and your application stable.
Start by defining the column with precise types and constraints. Use ALTER TABLE ADD COLUMN with defaults that avoid rewriting the entire table when possible. In PostgreSQL, adding a nullable column without a default is instant. Adding a column with a default value will rewrite data unless you use a DEFAULT with NOT NULL and backfill separately.
For large datasets, break the backfill into batches. This reduces lock times and avoids spikes in load. Never assume that an ALTER TABLE is free just because it is fast in development. Monitor locks and replication lag in staging before deploying to production.