title: auto vacuum vs vacuum in postgresql
body: <p>Postgresql has the functionality of Vacuum for recollecting the space occupied by dead tuples. Auto vacuum is on by default and runs according to the configuration setting. </p>
  
  <p>When I check the output of pg_stat_all_tables i.e. last_vacuum and last_autovacuum, autovacuum was never run for most of the tables in the database which have enough number of dead tuples(more than 1K). We also get a time window of 2-3 hours when these tables are used rarely.</p>
  
  <p>Below are autovacuum settings for my database
  <a href="https://i.stack.imgur.com/WFYu3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WFYu3.png" alt="enter image description here"></a></p>
  
  <p>below is the output of pg_stat_all_tables 
  <a href="https://i.stack.imgur.com/oZztg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oZztg.png" alt="enter image description here"></a></p>
  
  <p>I want to ask that is it a good idea to depend only on auto vacuum? 
  Are there any special setting required for autovacuum to function properly?<br>
  Should we set up a manual vacuum? Should we use both in parallel or just turn off autovacuum and use manual vacuum only? </p>