Adding a new column should be fast, safe, and predictable. In PostgreSQL, ALTER TABLE ADD COLUMN is the standard approach. By default, new columns allow NULL values unless you set constraints. For example:
ALTER TABLE users ADD COLUMN last_login_at TIMESTAMP;
This operation writes minimal data to disk if you allow NULLs. But adding a column with a default value in older versions can trigger a table rewrite, locking the table and impacting performance. Newer Postgres versions avoid the rewrite for certain defaults, but you should still test under load.
In MySQL, ALTER TABLE often rebuilds the table. On small datasets, the impact is negligible. On large datasets, downtime can spike if you run it on production without preparation. Using ALGORITHM=INPLACE or ALGORITHM=INSTANT can reduce or eliminate downtime depending on the storage engine and MySQL version.
In distributed databases like CockroachDB, schema changes are online but propagate asynchronously. This means you can add a new column without blocking queries, but constraints or defaults may still have performance tradeoffs.