pmx-pg-autovac - autovacuum with persistent state
Note: This utility is specifically for use with PostgreSQL 7.4.
The contrib program pg_autovacuum
is deficient, in that it only keeps
state of tables in memory, and exits on any db (connection) error.
When pg_autovacuum
loses state, it requires a vacuumdb -z
to resynchronize
the database with pg_autovacuum
.
pmx-pg-autovac
does a single pg_autovacuum
step, but keeps its
state in the public.autovac_state
table.
A side benefit of pmx-pg-autovac
is the ability to check the last
time at which each table was analyzed/vacuumed:
SELECT vacuum_time, analyze_time FROM autovac_state WHERE name = 'public.message'
This program logs information to autovac_log
.
new_state
table is created to calculate differences between
the previous state and the current state. On completion, the values from
this table will replace those in the autovac_state
table.
autovac_state
table is created.
pmx-pg-autovac
determined that no actions were required.
new_state
table. ERRSTR is the error message
returned by the database.
Copyright (C) 2006 Sophos Group. All rights reserved. Sophos and PureMessage are trademarks of Sophos Plc and Sophos Group.