4 ms·
“might cause”, yes. But at least with Postgres that only happens if you add a default value to the new column. You can add the default value in your applicatio
by jchb 6y ago
“might cause”, yes. But at least with Postgres that only happens if you add a default value to the new column. You can add the default value in your application instead, just like you would with your average NoSQL DB.
Then, when you have low load on your system, you can migrate the rows in batches to have a default value, and eventually remove the application default.
- phiresky 6y agoSince Pg12, even adding a column with a default doesn't lock the table anymore - that only happens if you later change or remove the default