vCenter database wraparound corruption error.
search cancel

vCenter database wraparound corruption error.

book

Article ID: 316526

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

ERROR: database is not accepting commands to avoid wraparound data loss in database "VCDB" HINT: Stop the postmaster and use a standalone back end to vacuum that database.
You might also need to commit or rollback old prepared transactions.

 

Environment

VMware vCenter Server 6.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x

Resolution

To resolve this issue, run Postgres in single-user mode and vacuum the database.

NOTE: Before applying the steps below, please take a backup or an offline-snapshot (in powered-off state) of the vCenter Server Appliance . If the vCenter is part of a Linked Mode replication setup, please backup/snapshot all replicating nodes as well. Please refer: VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice

  • Stop the vCenter services: service-control --stop --all
  • Switch to Postgres system user and start Postgres in single user mode: su -c "/opt/vmware/vpostgres/current/bin/postgres --single -D /storage/db/vpostgres VCDB" -s /bin/sh vpostgres
  • Run the vacuum command: vacuum analyze;

    Note: This step can take long time depending on the size of your database and VM's performance.
  • To exit: ctrl+D
  • Start vCenter services: /bin/service-control --start --all