This article describes a work-around and a solution for the error message 'database must be vacuumed '.
When trying to execute any command from the XOS CLI, the CPM may show a WARNING message similar to the following:
WARNING: database "running-config_alt" must be vacuumed within 7354631 transactions
A similar entry is recorded in
WARNING: database "running-config_alt" must be vacuumed within 10994670 transactions HINT: To avoid a database shutdown, execute a full-database VACUUM in "running-config_alt".
The same warning may appear for databases
alarmNtfDbase. The warnings can be also seen in the
show tech-support file.
In some cases, the
/cbconfig partition may run out of space due to this issue and XOS CLI becomes unavailable.
If your system displays these messages, maintenance of the Postgres database is required in order to vacuum old transactions.
A transaction ID is a global parameter in Postgres and shared by all databases. The wrap limit that triggers the need for the vacuum operation is calculated with the oldest transaction ID that might exist in any database. As soon as the limit is reached, the
/cbconfig disk partition gets filled up quickly due to logging of the warning at every transaction, the database eventually stops and the XOS CLI cannot be accessed.
To prevent the messages from appearing in the future, you should add the following cron job on each CPM of the chassis to ensure that the database is regularly vacuumed. Edit the
/var/spool/cron/postgres file on the CPM and add the highlighted line with "
vacuumdb -z -a" if it is missing: