From: Jim C. Nasby <jnasby@pervasive.com>
To: Mark Liberman <mliberman@mixedsignals.com>
Cc: Chris Hoover <revoohc@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Autovacuum Question
Date: Tue, 16 May 2006 13:31:01 -0500
Message-ID: <20060516183101.GJ26212@pervasive.com> (raw)
In-Reply-To: <9D938282F8C6EE43B748B910386DE93E0138B449@srvgpimail1.GPI.local>
References: <9D938282F8C6EE43B748B910386DE93E0138B449@srvgpimail1.GPI.local>
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 minute between each check. So, if, on average, it takes 60 seconds to perform the necessary vacuum/analyzes, then it there will 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jnasby@pervasive.com, mliberman@mixedsignals.com, revoohc@gmail.com
Subject: Re: Autovacuum Question
In-Reply-To: <20060516183101.GJ26212@pervasive.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox