Adding a new column to a production table can be trivial or critical. Done right, it adds capability without downtime. Done wrong, it locks writes, spikes CPU, or corrupts data. The difference is in how you plan, execute, and monitor the change.
First, confirm the purpose. Define the new column’s name, data type, default value, and whether it can be null. Changing these later is costlier than deciding up front. Align the schema change with current application logic, migrations, and version control.
Second, choose the safest method to apply the new column. In PostgreSQL, ALTER TABLE ADD COLUMN is fast if no default is written for every row. MySQL InnoDB supports instant add-column operations in many cases. For large datasets, consider online schema change tools like pt-online-schema-change or gh-ost. Test the process in a staging environment with production-like load.