Symptoms:
vpxd
service fails to start. /var/log/vmware/vpostgres/postgresql.log
, you see messages similar to:[YYYY-MM-DDTHH:MM:SS]
689cf970.452c 0 VCDB vc [local] 17708 3 ERROR: could not open file "pg_tblspc/16394/PG_13_########/#####/########": No such file or directory
[YYYY-MM-DDTHH:MM:SS]
689cf970.452c 0 VCDB vc [local] 17708 4 STATEMENT: BEGIN;declare "SQL_CUR0x7f45d400bac0" cursor with hold for SELECT EVENT_ID, CHAIN_ID, EVENT_TYPE, EXTENDED_CLASS, CREATE_TIME, USERNAME, CATEGORY, VM_ID, VM_NAME, HOST_ID, HOST_NAME, COMPUTERESOURCE_ID, COMPUTERESOURCE_TYPE, COMPUTERESOURCE_NAME, DATACENTER_ID, DATACENTER_NAME, DATASTORE_ID, DATASTORE_NAME, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, DVS_ID, DVS_NAME, STORAGEPOD_ID, STORAGEPOD_NAME, CHANGE_TAG_ID FROM VPXV_EVENT_ALL WHERE (EVENT_ID IN (########,########
,########
,########
,########
,########
,########
,########
)) LIMIT 8; ;fetch 1024 in "SQL_CUR0x7f45d400bac0"
Such corruption often arises from abrupt storage interruptions or improper shutdowns, leading to inconsistencies and, in some cases, the database integrity as well.
To fix the corruption issue, please implement the following steps:
service-control --stop --all
service-control --start vmware-vpostgres
/opt/vmware/vpostgres/current/bin/vacuumdb -U postgres -d VCDB --full –analyze
/opt/vmware/vpostgres/current/bin/reindexdb -U postgres -d VCDB
/opt/vmware/vpostgres/current/bin/pg_amcheck --username=postgres --all --verbose
( Only available for vCenter version 8.x).