Database in-place upgrade failed. Please see vcdb_inplace.err and vcdb_inplace.out for details.
1 [23505](1) ERROR: could not create unique index "pk_vpx_dual"
DETAIL: Key (dummy)=() is duplicated.;
Error while executing the query
Error while executing ./Upgrade-v2017-to-v2018/postgresql/upgrade_PostgreSQL.sql, reason: Statement failure(rc=-1).
vCenter Server 7.0X
vCenter Server 8.0X
This issue occurs when the vCenter database contains a duplicate value, specifically when the table vc.vpx_dual has more than one row. This table is supposed to contain only one row, any more will violate its key constraint.
To solve this issue, clean out the vCenter database table vc.vpx_dual in the source appliance, and retry the upgrade. To achieve this, apply the steps below:
Note: please ensure that a fresh backup of the vCenter Server Appliance exists before attempting to make any changes to the vCenter database.
# service-control --stop vmware-vpxd
# psql -d VCDB -U postgres
SELECT * FROM VPX_DUAL;
DELETE FROM VPX_DUAL;
INSERT INTO VPX_DUAL VALUES('X');
\q
# service-control --start vmware-vpxd