The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/10/static/ddl-alter.html Description: https://www.postgresql.org/account/comments/new/11/ddl-alter.html/ indicates that the table needs a rewrite when a column with a default value is added, my understanding of the 11 changes meant that is not true any longer. The blog post below supports that unless the feature was disabled in future. https://blog.dbi-services.com/postgresql-11-instant-add-column-with-a-non-null-default-value/ The specific bit of "Tip" text is; --- Adding a column with a default requires updating each row of the table (to store the new column value). However, if no default is specified, PostgreSQL is able to avoid the physical update. So if you intend to fill the column with mostly nondefault values, it's best to add the column with no default, insert the correct values using UPDATE, and then add any desired default as described below.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера