This topic describes the workflow of the Greenplum Database upgrade process. Learn what the different gpupgrade
phases involve in order to estimate how long it takes and what are the requirements your environment needs to meet for a successful upgrade.
NoteIn this documentation, we refer to the existing Greenplum Database 5 installation as the source cluster and to the new Greenplum Database 6 installation as the target cluster. They both reside in the same set of hosts.
gpupgrade
and Greenplum Database 6.x version for the target cluster.gpupgrade
initializes a fresh target cluster in the same set of hosts as the source cluster.gpupgrade
uses pg_upgrade
to upgrade the data and catalog in-place into the target cluster.The following diagram shows the different phases of the Greenplum upgrade process flow:
ImportantThe upgrade process requires downtime. We refer to the downtime required to perform the upgrade as the upgrade window.
gpupgrade
allows you to perform some of the steps to prepare your cluster for the upgrade before entering the upgrade window. Read the documentation carefully to understand how the process works.
gpupgrade
utility software.gupupgrade initialize
, which generates scripts that collect statistics and check for catalog inconsistencies between source and target cluster.gpupgrade initialize
command the starts the hub and agent processes, intializes the target cluster, and runs checks against the source cluster, including pg_upgrade --check
.gpupgrade execute
, which stops the source cluster and upgrades the master and primary segments using pg_upgrade
.gpupgrade finalize
command, which upgrades the segment mirrors and standby master.gpupgrade revert
, which restores the cluster to the state it was before you ran gpupgrade
.gpupgrade revert
after the Initialize or Execute phases, but not after Finalize.link
mode.The following example illustrates using the gpupgrade
utility for an environment with minimal set up. It assumes that you have Greenplum 5.28.10 on the source cluster, and that you have no installed extensions.
Install the latest target Greenplum version on all hosts.
gpscp -f all_hosts greenplum-db-6.24.0*.rpm =:/tmp
gpssh -f all_hosts -v -e 'sudo yum install -y /tmp/greenplum-db-6.24.0*.rpm'
Install gupgrade
on all hosts.
gpscp -f all_hosts gpupgrade*.rpm =:/tmp
gpssh -f all_hosts -v -e 'sudo yum install -y /tmp/gpupgrade*rpm'
Copy the example config file to $HOME/gpupgrade/
(you must create this directory first) and update the required parameters source_gphome
, target_gphome
, source_master_port
.
cp /usr/local/bin/greenplum/gpupgrade/gpupgrade_config $HOME/gpupgrade/
Run gpupgrade initialize
:
gpupgrade initialize --verbose --file $HOME/gpupgrade/gpupgrade_config
Run gpupgrade execute
:
gpupgrade execute --verbose
Run gpupgrade finalize
:
gpupgrade finalize --verbose
Update the Greenplum symlink so it points to the new installation:
gpssh -f all_hosts -v -e 'sudo rm /usr/local/greenplum-db && sudo ln -s /usr/local/greenplum-db-6.24.0 /usr/local/greenplum-db'
Start the Target Cluster (in a new shell):
source /usr/local/greenplum-db-6.24.0/greenplum_path.sh
gpstart -a