When it gets to be too big, it's a good time to do a vacuum full. I normally do it a few times a year on a few giant tables. Yes it locks up a table for a few minutes, but it is a big win and totally worth it.
Re:Improved vacuum in PostgreSQL 13
by takeda on Wednesday May 13, 2020 @10:12PM
(#23174448)
I'm not denying that VACUUM FULL is useful when things are out of hand. What I'm trying to say is that you probably don't have autovacuum tuned to run often enough (this is also what your link suggests)
Not saying do it all the time, but it is important to use surgically. You can easily calculate wasted table space
https://www.citusdata.com/blog/2017/10/20/monitoring-your-bl...
When it gets to be too big, it's a good time to do a vacuum full. I normally do it a few times a year on a few giant tables. Yes it locks up a table for a few minutes, but it is a big win and totally worth it.