Hacker News new | ask | show | jobs
by bpicolo 1499 days ago
Postgres has been able to safely add a not-null column with a default since version 11 (2018).

https://www.postgresql.org/about/news/postgresql-11-released...

2 comments

Some migrations are non-trivial and might take hours or days (e.g. they could involve hitting external services, or might require manual work). Sure you can default these, but `null` is probably semantically correct in most cases
Isn't that painfully slow in production? Or is that a mistake on my part?
You might be thinking of older postgres. See this SO: https://dba.stackexchange.com/a/211222