11.7. Reclaiming PostgreSQL Space
The PostgreSQL database can use a large amount of disk space especially in heavily loaded deployments. Use this procedure to reclaim some of this disk space on Satellite.
Procedure
Stop all services, except for the
postgresql
service:satellite-maintain service stop --exclude postgresql
# satellite-maintain service stop --exclude postgresql
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Switch to the
postgres
user and reclaim space on the database:su - postgres -c 'vacuumdb --full --dbname=foreman'
# su - postgres -c 'vacuumdb --full --dbname=foreman'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Start the other services when the vacuum completes:
satellite-maintain service start
# satellite-maintain service start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow