I want to purge the data under the Tasks table in VC DB SEAT.
This mount point is always full makes the VC fails to connect, I can only purge the data in the Events tables as a workaround only.
The PostgreSQL version is 9.4.9.1-4536683
Check below if that helps:
https://www.settlersoman.com/how-to-reclaim-space-on-storageseat-in-vcenter-appliance-5-5-or-6-x/
https://www.virtuallyghetto.com/2016/11/vcenter-server-database-retention-purge-schedule.html
Another safer option would be to resize the disk.
Connect to VCDB and run the below query to find out top 20 tables and find out which tables is consuming more disk space.
Query:
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_total_relation_size(C.oid)) AS "total_size"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
AND C.relkind <> 'i'
AND nspname !~ '^pg_toast'
ORDER BY pg_total_relation_size(C.oid) DESC
LIMIT 20;
Assuming vpx_task is utilizing more, run the below query to understand what is the root cause:
VCDB=# select task_id,descriptionid from vpx_task;