Adding a new column should be simple, but in real systems it often isn’t. The wrong approach can lock writes, slow queries, or block deployments. In relational databases like PostgreSQL, MySQL, and MariaDB, the method you choose depends on column type, default values, and whether data migration is required.
For small, low-traffic tables, a straightforward ALTER TABLE ADD COLUMN is fast and safe. For high-traffic or large datasets, you need an online schema change. Tools like gh-ost and pt-online-schema-change create a shadow table, backfill rows, and swap it in with minimal impact. PostgreSQL’s ADD COLUMN with a NULL default is instant, but setting a non-null default rewrites the whole table, so consider separating those steps.
For analytics or event pipelines, adding a new column to a streaming schema can trigger reprocessing. Systems like BigQuery or Snowflake often handle schema evolution with dynamic fields, but downstream consumers still need coordination. Schema registries and contract testing prevent breaking changes before they hit production.