Enable logical vPostgres replication for vCenter's reduced downtime upgrade
search cancel

Enable logical vPostgres replication for vCenter's reduced downtime upgrade

book

Article ID: 400129

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

vCenter's reduced downtime upgrade shows a warning with the message: "The vCenter's upgrade will use inefficient database replication mechanism which will affect the downtime."

New functionality is introduced in vCenter's reduced downtime upgrade that utilizes the Postgres logical replication mechanism - https://www.postgresql.org/docs/current/logical-replication.html.
The logical vPostgres replication minimizes the vCenter's upgrade downtime.
The functionality is delivered in vCenter 9.1 and is enabled by default when upgrading a vCenter 9.1 version to a newer version.
This KB article allows the customer to enable the new functionality if the vCenter is upgraded from 8.x or 9.0 to 9.1 or above

Environment

vCenter 9.1.x

Cause

The logical vPostgres replication requires the vPostgres WAL level of the vCenter to be upgraded to be set to logical.
However, older vCenter versions (8.x and 9.0) have vPostgres WAL level set to replica.
The logical vPostgres replication can still be enabled for upgrades to 9.1 if you manually change the WAL level to logical

Resolution

The KB article applies only for upgrading vCenter 8.x or 9.0 to 9.1.

Workaround:
1. Log in to the vCenter Server Appliance through SSH.
2. Type shell and press Enter.
3. Check the current WAL level is replica
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -t -c "SHOW wal_level"
expected output: replica
4. Change the WAL level to logical
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -t -c "ALTER SYSTEM SET wal_level=logical"
5. Restart the vpostgres service. Note that during vPostgres restart, some of the vCenter services might be temporarily unavailable, and the ongoing operations might fail
service-control --restart vmware-vpostgres
6. Check the WAL level is changed to logical
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -t -c "SHOW wal_level"
expected output: logical