Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Drupal 7 with PostgreSQL as a Q&A (with a lot of nodes inserts/updates and several contrib modules). Do you, dba admins, recommand any particular pgsql vacuum policy on particular default tables ?

share|improve this question
Your question might get better answers over on our DBA site -- I can move it there if you would like... – voretaq7 Mar 1 '12 at 18:30

Any recent version of Postgres will have an autovacuum process. Let the autovacuum do its work - It is very good at its job, and will run in such a way as to not interfere with normal use of the database.

If you make a huge number of changes you may want to run a VACUUM ANALYZE on the whole database.
If you did a lot of deleting you may opt for a VACUUM FULL ANALYZE to compact the tables, but note that this will lock the tables while it compacts them -- Do not run it on a production system of any real size without a maintenance window.

You can read more about tuning autovacuum (and times when you might need/want to manually VACUUM your database) in the Postgres documentation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.