Re:In Praise of PostgreSQL
by bostonvaulter2 on Thursday August 05, 2021 @05:43PM
(#28080336)
Yes, but generally that could be handled in a multi-stage process. First you would create the new column with no constraint, then periodically start updating the rows, once nearly all the rows are updated with the new default, in a transaction you update the rest of the rows, update the table with the constraint, and set the default. Not very much downtime is required with this approach (although of course it is more involved).
[ Parent
| on HN ]
There are no comments on this comment yet.