This topic walks you through upgrading from Greenplum 6 to Greenplum 7.
WARNING There are a substantial number of changes between Greenplum 6 and Greenplum 7 that could potentially affect your existing application when you move to Greenplum 7. Before going any further, familiarize yourself with all of these changes Important Changes between Greenplum 6 and Greenplum 7.
NoteYou cannot upgrade to VMware Greenplum 7.0.0 using the
gpupgrade
utility.
To prepare for upgrading from Greenplum 6 to Greenplum 7:
Read carefully through Important Changes between Greenplum 6 and Greenplum 7 to identify changes you may need to make in your application before upgrading to Greenplum 7.
Before using gpbackup
/gprestore
to move your data, read carefully through Backup and Restore Caveats to avert problems that can arise.
Follow the steps in this section to upgrade from Greenplum 6 to Greenplum 7.
When upgrading, you may move your data in one of two ways:
gpbackup/gprestore
utilitiesgpcopy
utilityReview Backup and Restore Caveats before starting the upgrade.
To upgrade while moving data using gpbackup/gprestore
:
If not already installed, install the latest release of the Greenplum Backup and Restore utilities, available to download from Broadcom Support Portal or GitHub.
NoteFor more information about download prerequisites, troubleshooting, and instructions, see Download Broadcom products and software.
Run the gpbackup
utility to back up the data from your Greenplum 6 cluster to an external data storage location, such as mounted directories, cloud storage, or Data Domain. For more infomation on gpbackup
, see the VMware Greenplum Backup and Restore guide.
Initalize a Greenplum 7 cluster on the destination hardware, by issuing the gpinitsystem
command.
Install any external modules used in your Greenplum 6 system in the Greenplum 7 system before you restore the backup, for example MADlib or PostGIS. If versions of the external modules are not compatible, you may need to exclude tables that reference them when restoring the Greenplum 6 backup to Greenplum 7.
Run the gprestore
utility to restore your data to the Greenplum 7 cluster from the external data storage location. For more infomation on gprestore
, see the VMware Greenplum Backup and Restore guide.
gpcopy
Review the information in Migrating Data with gpcopy.
Initalize a Greenplum 7 cluster on the destination hardware, by issuing the gpinitsystem
command.
Verify network connectivity between your Greenplum 6 and your Greenplum 7 cluster.
Run the gpcopy
utility to migrate your data to the Greenplum 7 cluster.
Migrate any tables you skipped during the restore using other methods, for example using the COPY TO
command to create an external file and then loading the data from the external file into Greenplum 6 with the COPY FROM
command.
Recreate any objects you dropped in the Greenplum 6 database to enable migration, such as external tables, indexes, user-defined functions, or user-defined aggregates.
After migrating data you may need to modify SQL scripts, administration scripts, and user-defined functions as necessary to account for changes in Greenplum Database version 7. Review the VMware Greenplum 7.0.0 Release Notes and Important Changes between Greenplum 6 and Greenplum 7 for features and changes that may necessitate post-migration tasks.
There are a number of caveats with respect to backing up and restoring your data as part of upgrading from Greenplum 6 to Greenplum 7.
Before you do an actual backup, use gpbackup
to create a --metadata-only
backup from the source Greenplum database and restore it to the Greenplum 7 system. Review the gprestore
log file for error messages and correct any remaining problems in the source Greenplum database.
If you intend to install VMware Greenplum 7 on the same hardware as your 6 system, you will need enough disk space to accommodate over five times the original data set (two full copies of the primary and mirror data sets, plus the original backup data in ASCII format) in order to migrate data with gpbackup
and gprestore
. Keep in mind that the ASCII backup data will require more disk space than the original data, which may be stored in compressed binary format. Offline backup solutions such as Dell EMC Data Domain can reduce the required disk space on each host.
If you do not have the disk space, then:
gpbackup
on your Greenplum 6 cluster to back up your datagpdeletesystem
to remove the existing Greenplum 6 clusterWhen restoring language-based user-defined functions, the shared object file must be in the location specified in the CREATE FUNCTION
SQL command and must have been recompiled on the Greenplum 7 system. This applies to user-defined functions, user-defined types, and any other objects that use custom functions, such as aggregates created with the CREATE AGGREGATE
command.
gpbackup
saves the distribution policy and distribution key for each table in the backup so that data can be restored to the same segment. If a table's distribution key in the Greenplum 6 database is incompatible with Greenplum 7, gprestore
cannot restore the table to the correct segment in the Greenplum 6 database. This can happen if the distribution key in the older Greenplum release has columns with data types not allowed in Greenplum 7 distribution keys, or if the data representation for data types has changed or is insufficient for Greenplum 7 to generate the same hash value for a distribution key. You should correct these kinds of problems by altering distribution keys in the tables before you back up the Greenplum database.
Parent topic: Installing and Upgrading Greenplum