Adding a new column should not be a gamble. Whether you work with PostgreSQL, MySQL, or any modern relational database, the process must be deliberate to protect uptime, performance, and consistency. The wrong approach can lock tables, block writes, or trigger costly reindexing.
In PostgreSQL, ALTER TABLE table_name ADD COLUMN column_name data_type; creates the column instantly if no default is set. But adding with a default value writes to every row. On large datasets, that operation can block queries and explode transaction logs. The safer path is two steps: first add the column as nullable, then backfill data in controlled batches, and only after that enforce constraints.
In MySQL, adding a column can trigger a full table rebuild, depending on storage engine and version. Check ALGORITHM=INPLACE where possible, and always measure the impact in a staging environment. For high-traffic systems, schedule these changes during low usage periods or use online schema change tools like gh-ost or pt-online-schema-change.