Failed to start vmware-vpostgres service, even after using su - vpostgres -c "/opt/vmware/vpostgres/current/bin/pg_ctl start -D /storage/db/vpostgres". Found the below logs in postgres log file.
WARNING: Failed to open file "/sys/fs/cgroup/memory/system.slice/vmware-vpostgres.service/memory.stat": No such file or directory
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2219 0 LOG: Writing instance status...
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2219 0 LOG: Wrote instance status successfully.
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2219 0 LOG: Updated instance status successfully.
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2218 0 LOG: could not open temporary statistics file "/dev/shm/postgres_stats/global.tmp": No such file or directory
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2218 0 LOG: could not open temporary statistics file "/dev/shm/postgres_stats/global.tmp": No such file or directory
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2217 0 LOG: using stale statistics instead of current ones because stats collector is not responding
YYYY-MM-DD HH:MM:SS UTC 6049eaa6.2218 0 LOG: could not open temporary statistics file "/dev/shm/postgres_stats/global.tmp": No such file or directory
VMware vCenter Server 6.x
VMware vCenter Server 7.x
The main files/directories from the OS level related to vpostgres have been missed, could be corruption, failover issue.
Workaround:
*Create the parent directory and the temp file with the needed permissions in /dev/shm:
*Create the parent directory in /sys/fs/cgroup/memory/system.slice:
start vmware-vpostgres service
The parent files/directories we created will not persist/initialized after reboot. You can take vCenter server File-Based Backup and Restore.
This is a temp solution as the parent files/directories we created will not persist/initialized after reboot. You can take vCenter server File-Based Backup and Restore.