Re: Adjust autovacuum naptime automatically - Mailing list pgsql-hackers

From Matthew T. O'Connor
Subject Re: Adjust autovacuum naptime automatically
Date
Msg-id 44E4A888.4070507@zeut.net
Whole thread Raw
In response to Re: Adjust autovacuum naptime automatically  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
Jim C. Nasby wrote:
> On Thu, Aug 17, 2006 at 03:00:00PM +0900, ITAGAKI Takahiro wrote:
>   
> IMO, the only reason at all for naptime is because there is a
> non-trivial cost associated with checking a database to see if any
> vacuuming is needed.
>   

This cost is reduced significantly in the integrated version as compared 
to the contrib version, but yes still not zero.

> One problem that I've run across is that in a cluster with a lot of
> databases it can take a very long time to cycle through all of them.
>
> Perhaps a better idea would be to check a number of databases on each
> pass. That way you won't bog the server down while checking, but it
> won't take as long to get to all the databases.
>
> Also, autovac should immediately continue checking databases after it
> finishes vacuuming one. The reason for this is that while vacuuming,
> the vacuum_cost_delay settings will almost certainly be in effect, which
> will prevent autovac from hammering the system. Since the system won't
> be hammered during the vacuum, it's ok to check more databases
> immediately after finishing vacuuming on one.
>   

This is basically what Itagaki's patch does. 

> Does anyone have any info on how much load there actually is when
> checking databases to see if they need vacuuming?
>   

I haven't.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum on by default?
Next
From: "Larry Rosenman"
Date:
Subject: Re: Autovacuum on by default?