Question

I've got a task to work with a 9.6 Postgres DB, and for some reason Autovacuum is disabled.

The database was extremely slow, and after a manual VACUUM it could breathe again.

The point is, why disable Autovaccum? Is there any practical scenario for a small database to have Autovaccum disabled?

Was it helpful?

Solution

There is no good reason to keep autovacuum disabled in a production database, and you will run into problems if you do that.

It may make sense to disable autovacuum during exceptional operations, where you run a manual vacuum anyway and don't want your performance sapped by a background job, but more often than not such trickery is a premature optimization.

I would run VACUUM (FULL) on the database, followed by VACUUM (ANALYZE). That shoud take care of any damage done.

Then enable autovacuum.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top