This document discusses changing data types for a large production table in PostgreSQL. It describes how to add a new column with the correct data type, copy over the values in batches using a trigger and procedure to avoid locking the table, and then drop the old column and rename the new column. The process takes over 7 hours to complete on a table with 1.7 billion rows but allows the table to remain online and available during the migration.
Related topics: