|
|
|
|
|
by mattashii
770 days ago
|
|
> Confused why people do this in the first place. Because you lose a significant amount of performance if you start adding NULL and variable-length columns just because you're afraid of a table rewrite. Because the resulting table will not have had 1 table of update-induced bloat at the end of the operation. Because you can be sure the modification is applied atomically and you as the user can be sure the migration from A to B goes through as expected or has a graceful rollback to the old data, rather than getting stuck or failures halfway through the migration. Because toasted data from DROP-ed columns is not removed from storage with the DROP COLUMN statement, but only after the row that refers to that toasted value is updated or deleted. ... Every column you "DROP" remains in the catalogs to make sure old tuples' data can be read from disk. That's overhead you now will have to carry around until the table is dropped. I'm not someone who likes having to carry that bloat around. |
|