Once upon a time, Lucie Leistnerova <lleistne(a)redhat.com> said:
you can use engine tools: engine-vacuum and dwh-vacuum.
It can do full vacuum with -f option and also it runs with
engine-setup when you choose it.
engine-vacuum doesn't appear to touch the DWB DB, and I don't have a
dwh-vacuum (on 4.1). After reading a RHBZ, the issue was the various
*_samples_* tables, so I did:
########################
systemctl stop ovirt-engine-dwhd.service
. /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf
PGPASSWORD="$DWH_DB_PASSWORD" psql \
-h "$DWH_DB_HOST" \
-p "$DWH_DB_PORT" \
-U "$DWH_DB_USER" \
-d "$DWH_DB_DATABASE" \
<<'EOF'
vacuum full host_interface_samples_history;
vacuum full vm_disk_samples_history;
vacuum full vm_disks_usage_samples_history;
vacuum full vm_interface_samples_history;
vacuum full vm_samples_history;
EOF
systemctl start ovirt-engine-dwhd.service
########################
That reduced my Postgres DB size from 15G to 1.4G.
--
Chris Adams <cma(a)cmadams.net>