During this phase, you run the gpupgrade finalize
command that upgrades the Greenplum segment mirrors and standby master.
CautionOnce you run
gpupgrade finalize
, you cannot usegpupgrade revert
.gpupgrade
will not be able to restore the original 5.x Greenplum cluster.
The following table summarizes the cluster state before and after gpupgrade finalize
runs:
Before Finalize | After Finalize | |||
---|---|---|---|---|
Source | Target | Source | Target | |
Master | DOWN | UP and populated | DOWN | UP |
Standby | DOWN | Non Existent | DOWN | UP |
Primaries | DOWN | UP and populated | DOWN | UP |
Mirrors | DOWN | Non Existent | DOWN | UP |
The gpupgrade finalize
command performs the following substeps:
Run the gpupgrade finalize
command from the Greenplum master:
gpupgrade finalize --verbose
The utility displays a summary message and waits for user confirmation before proceeding. Then it proceeds to run the different substeps and displays its progress on the screen:
Checking active connections on target cluster... [COMPLETE]
Upgrading mirror segments... [COMPLETE]
Upgrading standby master... [COMPLETE]
The utility prompts you to run the Finalize data migration SQL scripts, if applicable. It displays all the scripts that it needs to apply, along with an explanation of what they do. The tool provides several options: none, some and all. Apply the provided scripts to get any database objects that were modified or dropped during gpupgrade initialize
back to their original state.
To resolve any [FAILED]
substeps review the screen error comments and recommendations, and visit Troubleshooting and Debugging.
When the finalize process has completed, gpupgrade
reports the master listen port and master data directory for the source and target cluster.
The gpupgrade finalize
command renames the target directory names to the original names of their corresponding source directories. It also renames the original source data directories to:
<segmentPrefix>.<upgradeID>.<contentId>.old
Where:
<segmentPrefix>
is the segment prefix string specified when the source Greenplum Database system was initialized. This is typically gpseg
.<upgradeID>
is the 10-character string generated by gpupgrade
for this upgrade instance.<contentId>
is the database content ID for the segment. The master segment instance content ID is always −1..old
indicates that the directory is no longer the currently active data directory.The gpupgrade finalize
command archives all the log files of the upgrade process in the $HOME/gpAdminLogs/gpupgrade
directory by renaming the directory with a timestamp, in the format $HOME/gpAdminLogs/gpupgrade-<upgradeID>-<timestamp>
.
Perform the following steps to connect to your target cluster:
Update any scripts that source greenplum_path.sh
to use the new path <target-gpdb-install-dir>/greenplum_path.sh
.
In a new shell, reset the target cluster environment to use the original master data directory and master port number you were using in the source cluster, and source the greenplum_path.sh
file in the target Greenplum Database installation directory:
source <target-gpdb-install-dir>/greenplum_path.sh
export MASTER_DATA_DIRECTORY="<data_directory_path>"
export PGPORT=<port_number>
Run gpstate
. It should now show that the master, standby master, primary segments, and mirror segments are all running.
Connect to the database.
Once the gpupgrade finalize
command has completed successfully and the new Greenplum Database cluster is up and running, follow the steps summarized in Perform the Post-Upgrade Actions.