VMware Cloud Community
presariohk
Contributor
Contributor

Purge data in VC DB SEAT

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

pastedImage_0.png

Reply
0 Kudos
2 Replies
RickVerstegen
Expert
Expert

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.

Was I helpful? Give a kudo for appreciation!
Blog: https://rickverstegen84.wordpress.com/
Twitter: https://twitter.com/verstegenrick
Reply
0 Kudos
Vijay2027
Expert
Expert

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;

pastedImage_0.png

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;                                                                              

Reply
0 Kudos