Re: Autovacuum Question - Mailing list pgsql-admin

From Jim C. Nasby
Subject Re: Autovacuum Question
Date
Msg-id 20060516183101.GJ26212@pervasive.com
Whole thread Raw
In response to Re: Autovacuum Question  ("Mark Liberman" <mliberman@mixedsignals.com>)
List pgsql-admin
On Tue, May 16, 2006 at 10:30:26AM -0700, Mark Liberman wrote:
> >Does this mean that each run of autovacuum will vacuum/analyze all tables
> >that need work in the database that autovacuum is looking at?
>
> Yes, it will do all tables that satisfy the criteria.
>
> >Also, with over 200 databases, does this mean that a database will only get
> >checked once about every 3.5 hours, or does autovacuum run on the database
> >that needs the vacuuming the most?
>
> If, you have it set to 60 seconds, then yes.  It hits one db each minute.  Actually, to be more clear, it sleeps 1
minutebetween each check.  So, if, on average, it takes 60 seconds to perform the necessary vacuum/analyzes, then it
therewill be, on average, 2 minutes between each db, or 400 minutes to get through all 200 dbs. 

The sleep time is so that the daemon doesn't just sit there hammering
the database, checking to see if it needs to vacuum anything. If you've
got 200 tables in one cluster, you should probably drop the sleep time
way down; probably closer to 10 or even 1.

Ideally, every time the daemon runs, there would be exactly one database
that needed vacuuming.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-admin by date:

Previous
From: Jeff Frost
Date:
Subject: Re: does wal archiving block the current client connection?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: How can i hide the unnecessary schemas from developers