su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433 -x -c 'SELECT * FROM pg_stat_replication;'"streaming statussu - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433 -x -c 'SELECT * FROM pg_stat_wal_receiver;'"This article provides steps to force the Replica node to take over the Primary role in a VMware Aria Operations (formerly vRealize Operations) Operations cluster.
VMware Aria Operations 8.x
In a High Availability (HA) cluster, if the Primary node becomes unavailable (e.g., during a power cycle or reboot), the Replica node is designed to take over the PostgreSQL master role automatically to ensure the cluster remains operational. This is expected behavior.
Take snapshots of the nodes (Primary/Primary Replica/Data) as per KB Snapshot Creation in VMware Aria Operations
Log in to the Admin UI on the Primary node using the URL: https://IP_or_FQDN/admin
Note: Replace IP_or_FQDN with the IP address of FQDN of the Primary node.
After the snapshot process is done bring the cluster back Online.
Select the node currently listed as Primary (this should be the node you wish to demote to Replica) and click Take Node Offline.
Provide a reason and click OK.
Wait approximately 15 minutes. The HA subsystem will promote the remaining online node (your original Primary) to the Primary role.
Once the UI reflects the role change, select the offline node and click Bring Node Online.
The node will rejoin the cluster and assume the Replica role.
Verify the status of both nodes shows Healthy.