Adding a new column in a live database is never just a schema tweak. It changes queries, indexes, migrations, and sometimes the codebase itself. In relational databases like PostgreSQL, ALTER TABLE ADD COLUMN is the fastest way to create a column. But speed depends on defaults, data types, and constraints. Adding a column with a default value in older PostgreSQL versions rewrote the whole table. On large datasets, that meant locks and downtime.
Modern PostgreSQL versions (11+) handle ALTER TABLE ... ADD COLUMN ... DEFAULT without table rewrites for constant defaults. MySQL behaves differently: some versions require full table copies for structural changes. In both cases, pay attention to data type choice—TEXT and JSONB have different storage patterns and indexing options. For time-sensitive rollouts, decouple schema changes from data backfills. First, add the new column as nullable. Later, update rows in small batches. Finally, apply a NOT NULL constraint after the data is complete.
In distributed systems, adding a new column can break services if serialization formats are strict. Update schemas in a backward-compatible way—deploy readers before writers, ensure old code ignores unknown fields, and avoid concurrently dropping or renaming columns.