Just upgraded from Postgres 11 to 12 and saw a 35% reduction in the database size on disk.
What is this magic?!?!
Conversation
Yeah, thought something along those lines. But doesn’t it require ‘vacuum [analyse] full’ before it will release unused space?
1
yes-ish. IIRC a normal VACUUM will allow earlier reuse of rows (so tables don't grow as much in the first place), but it doesn't free table space. You really don't want to run VACUUM FULL, but instead do a normal VACUUM on a regular schedule, so updates don't need to grow tables.
2
Actually, normal VACUUM can release space used by tables (though not indexes) to the OS, though it doesn't do so very reliably



