2022 Developer Survey is open! Take survey.

New answers tagged

1 vote

WAL efficient alternative to VACUUM FULL

Creating and dropping is basically equivalent to VACUUM FULL. The lock will be held for less time, but that is because changes not locked out during the copy will be discarded when the drop is done, ...
user avatar
  • 31.6k
3 votes

Is it safe to use default value with not null when adding a new column?

That statement is safe. An ALTER TABLE will never lock "the database", it will only lock the table. Postgres will not actually rewrite the table because you provided a constant value (false) ...
user avatar

Top 50 recent answers are included