4 ms·
Adding a column, changing column's nullability and adding/changing constraints is already zero-downtime in PG. Not sure about default value change, but I would
by kroolik 5y ago
Adding a column, changing column's nullability and adding/changing constraints is already zero-downtime in PG.
Not sure about default value change, but I would also say its zero-downtime as adding a column with default is zero-downtime. Haven't checked, though.
Dropping a column and changing the data type are not zero-downtime.
Renaming a column is not zero-downtime as you might have multiple readers/writes using both.
- mikeklaas 5y agoAdding a NULL constraint isn't zero downtime since PG scans the whole table ensuring that the constraint is not violated.
- postgressomethi 5y ago> Adding a column, changing column's nullability and adding/changing constraints is already zero-downtime in PG. Making a previously nullable column NOT NULL is not zero downtime. Neither are adding constraints -- except in some cases with NOT VALID, which isn't quite the same thing. > Dropping a column and changing the data type are not zero-downtime. Dropping a column is zero downtime.