How to shrink the database

From Tech-Wiki
Jump to: navigation, search


If the partition is full delete some old log files to make some space.

Change the number of days

Configure > Administration > Maintenance
Reduce the number of days in the Cleanup Historical Data table

Start the database

start db

Start the deletion of the old data

/usr/local/st/st_monitor
tail -F /var/log/st/st_monitor

Reclaim the database space (vacuum the DB)

psql securetrack -Upostgres -c "VACUUM FULL"