VCF Operations 9.x
The primary database pod (vidb-postgres-instance-0) experienced disk space exhaustion on the leader partition (e.g., /dev/sdm or /home/postgres/pgdata). This was triggered by excessive OAuth/Refresh token generation, causing the partition to reach 100% capacity and halting service operations.
Prerequisite: Ensure a snapshot of the environment is taken before performing any database modifications.
To resolve this issue, perform the following steps to reclaim space and prevent recurrence:
kubectl exec -n vidb-external vidb-postgres-instance-0 -c postgres -- psql -U postgres -d vcdb -c "SELECT "tokenType", count() AS total, count() FILTER (WHERE expires >= LOCALTIMESTAMP) AS still_valid FROM "TOKEN_Token" GROUP BY 1 ORDER BY 2 DESC;"NOTE : If you get api-tokens count greater than zero in above output, we need to take customer consent. Because If we delete api-tokens customer need to manually generate them.
To truncate the table (reclaim space):
kubectl exec -n vidb-external vidb-postgres-instance-0 -c postgres -- psql -U postgres -d vcdb -c "SET lock_timeout = 5000; TRUNCATE TABLE "TOKEN_Token";"
A permanent fix has been planned for a future release and the KB will be updated with the version once the release is available.