Search Postgresql Archives

Re: AutoVacuum on demand?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hmm, I thought this would be obvious.  Vacuumdb just issues "VACUUM" 
> commands.
> 
> I would like the get the functionality if autovacuum so that I don't 
> waste cycles on tables that don't really need vacuuming.  However, we've 
> had bad luck letting autovacuum run on its own terms, so we've reverted 
> to the old nightly vacuums.
> 
> Since our nightly window of relative inactivity continues to shrink, I'd 
> like to vacuum/analyze only the tables that autovacuum thinks need it, 
> all at once, and only when I tell it to (via cron).
> 
> Make more sense?

If you could instruct auto_vacuum not to vacuum certain tables would that accomplish what you
wanted in place of having auto_vacuum enable/dis-abled from a cron?

http://www.postgresql.org/docs/8.1/interactive/maintenance.html#AUTOVACUUM
Besides the base threshold values and scale factors, there are three more parameters that can be
set for each table in pg_autovacuum. The first, pg_autovacuum.enabled, can be set to false to
instruct the autovacuum daemon to skip that particular table entirely. In this case autovacuum
will only touch the table when it vacuums the entire database to prevent transaction ID
wraparound. The other two parameters, the vacuum cost delay (pg_autovacuum.vac_cost_delay) and the
vacuum cost limit (pg_autovacuum.vac_cost_limit), are used to set table-specific values for the
Cost-Based Vacuum Delay feature. 

Regards,

Richard Broersma Jr.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux