Planned maintenance/upgrade requires a role swap between the primary coordinator and standby coordinator.
Environment
Tanzu Greenplum
Resolution
Switchover to standby coordinator
Ensure standby coordinator is configured and is in sync with the current master with gpstate -f
If status is not "Synchronized", run gpinitstandby -n.
Stop the current coordinator: gpstop -m
Login to the standby coordinator with ssh.
Set the environment variables: bash export COORDINATOR_DATA_DIRECTORY="<path_to_coordinator_data_directory>" export PGPORT=<Greenplum_port>
Activate the standby: gpactivatestandby -d $COORDINATOR_DATA_DIRECTORY
Verify activation: gpstate -e
Add original coordinator as standby coordinator
Ensure the original coordinator host is online
Login to the original coordinator with ssh
Delete or rename the data directory, that is the $COORDINATOR_DATA_DIRECTORY: mv $COORDINATOR_DATA_DIRECTORY ${COORDINATOR_DATA_DIRECTORY}.$(date %Y%m%d) The backup directory can be removed once the standby is successfully configured and verified.
Login to the current coordinator (that is the host currently running the coordinator) with ssh
Initialize the standby coordinator: gpinitstandby -s <original_coordinator_hostname>