I have a table with 50 million rows and 40+ text columns. Size of the table is around 17GB. Inside a transaction, I add another integer column to the table and update all the rows with corresponding values. After the transaction is done, the size of the table doubles to about ~35GB.
VACUUM FULL ANALYZE brings the size of the table back to 17GB, but it takes about 10 hours to complete! Here are the specs:
24GB RAM, 16 cores, 2.4GHz
postgresql.conf settings -
shared_buffers = 3GB
effective_cache_size = 15GB
All other settings are default.