NAME

pmx-pg-autovac - autovacuum with persistent state


DESCRIPTION

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'


LOGGING

This program logs information to autovac_log.

DEBUG

Created temporary table 'new_state'
Logged when the 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.

Performing the following actions: ACTIONS
Logs the list of the SQL commands (ACTIONS) to be performed.

INFO

Creating autovac_state table
Logged when the autovac_state table is created.

Completed in SECONDS seconds
This message indicates the time it took, in seconds, to perform the database actions. This message is only logged if there are actions to perform (see below).

Nothing to do; exiting
Logged if pmx-pg-autovac determined that no actions were required.

ERROR

Failed to create temporary table 'new_state': ERRSTR
Indicates a failure to create the new_state table. ERRSTR is the error message returned by the database.

Failed to run actions and update autovac_state table: ERRSTR
Logged when the necessary database actions failed to run. ERRSTR is the error message.


COPYRIGHT

Copyright (C) 2006 Sophos Group. All rights reserved. Sophos and PureMessage are trademarks of Sophos Plc and Sophos Group.