mattmscott
1/20/2020 - 8:22 PM

Clear vCenter Appliance Logs

https://www.jayakumar.org/general/vcenter-6-7-vcsa-vpxd-service-wont-start-due-to-storage-seat-disk-full/

service vmware-vpxd stop /opt/vmware/vpostgres/9.6/bin/psql -d VCDB postgres service vmware-vpxd start

https://be-virtual.net/vcsa-6-7-out-of-space-seat/

Seat is hard disk 8 on ws-vca-01 - 6.7

DO
$$
DECLARE
    rec   record;
BEGIN
   FOR rec IN
      SELECT *
      FROM   pg_tables
      WHERE tablename ~ '^vpx_event_[0-9].*'
      ORDER  BY tablename
   LOOP
      EXECUTE 'TRUNCATE TABLE '
        || quote_ident(rec.schemaname) || '.'
        || quote_ident(rec.tablename) || ' CASCADE';
   END LOOP;
END$$;

DO
$$
DECLARE
    rec   record;
BEGIN
   FOR rec IN
      SELECT *
      FROM   pg_tables
      WHERE tablename ~ '^vpx_event_arg_[0-9].*'
      ORDER  BY tablename
   LOOP
      EXECUTE 'TRUNCATE TABLE '
        || quote_ident(rec.schemaname) || '.'
        || quote_ident(rec.tablename) || ' CASCADE';
   END LOOP;
END$$;