heroku pg:psql --app app_name
ALTER TABLE table_name SET (autovacuum_vacuum_threshold = 50);
ALTER TABLE table_name SET (autovacuum_vacuum_scale_factor = 0.2);
ALTER TABLE table_name SET (autovacuum_enabled = true, toast.autovacuum_enabled = true);
Para maiores informações:
https://devcenter.heroku.com/articles/heroku-postgres-database-tuning
http://www.postgresql.org/docs/9.2/static/routine-vacuuming.html#AUTOVACUUM