Adding a new column in a database sounds simple, but the wrong approach can lock tables, block queries, or trigger a cascade of failed writes. The key is knowing how your database engine handles schema changes and choosing a safe migration strategy.
In PostgreSQL, ALTER TABLE ADD COLUMN is lightweight if the column is nullable or has a default of NULL. But if you set a non-null default, the database writes that value to every existing row at once. For a large table, that can take minutes or hours, and every query waits. The right way is to add the column as nullable, backfill in batches, and then enforce constraints.
In MySQL, online DDL options exist when you use ALGORITHM=INPLACE or ALGORITHM=INSTANT on recent versions. Instant ADD COLUMN is fast for certain scenarios, but not all. Always verify with SHOW CREATE TABLE and test migrations on production-like data.
For analytics workloads, adding a new column to columnar stores like BigQuery or Snowflake can be metadata-only. The schema change is immediate, but you still need to update ETL scripts and downstream dependencies to prevent mismatched schemas across environments.