|Pivotal Greenplum (GPDB)||4.3 and later|
The database is on 4.3 and needs to be upgraded to the later version.
Note: The current database could be 4.3.2 or above, this article instructs how to upgrade the Greenplum database to a higher version.
Important: If you are upgrading to 22.214.171.124 and above, make sure that the gp_interconnect_type must be UDPIFC, since UDP has been deprecated from 126.96.36.199.
Follow the instructions for upgrading the GPDB version:
- Download and copy the installer file to the Greenplum Database master host from www.pivotal.io based on your system (DCA or Non-DCA). It is a good practice to copy at the same location, where the previous installation was stored. In this case, the default location is /usr/local/.
- Run the following query to stop the database:
- Install the binary on the master and all the segments.
(Non-DCA) Install the Greenplum Database 4.3 Software Binaries
IMPORTANT NOTE: If you are installing the Greenplum Database 4.3 on a Pivotal DCA system, see "Install the Greenplum Database 4.3 Software Binaries on DCA Systems" below. This section is for installing Greenplum Database 4.3 on non-DCA systems.
- Download or copy the installer file to the Greenplum Database master host from www.pivotal.io .It is a good practice to copy at the same location where the previous installation exists - default location - /usr/local/ .
- Unzip the installer file and give permissions. For example:
# unzip greenplum-db-188.8.131.52-PLATFORM.zip # chmod +x greenplum-db-184.108.40.206-PLATFORM.bin
- Launch the installer using bash. For example:
# /bin/bash greenplum-db-220.127.116.11-PLATFORM.bin
- The installer will prompt you to accept the Greenplum Database license agreement. Type "yes" to accept the license agreement.
- The installer will prompt you to provide an installation path. Press ENTER to accept the default install path (for example: /usr/local/greenplum-db-18.104.22.168), or enter an absolute path to an install location. You must have write permissions to the location you specify.
- The installer installs the Greenplum Database software and creates a greenplum-db symbolic link one directory level above your version-specific Greenplum installation directory. The symbolic link is used to facilitate patch maintenance and upgrades between versions. The installed location is referred to as $GPHOME.
- Source the path file from your new 4.3.x.x installation. This example changes to the gpadmin user before sourcing the file:
# su - gpadmin # source /usr/local/greenplum-db-22.214.171.124/greenplum_path.sh
- Run the gpseginstall utility to install the 126.96.36.199 binaries on all the segment hosts specified in the hostfile. For example:
$ gpseginstall -f hostfile
- Once done, start the database using
(DCA) Install the Greenplum Database 4.3 Software Binaries
Important: Skip this section if you are not installing Greenplum Database 4.3 on DCA systems. This section is only for installing Greenplum Database 4.3 on DCA systems. For Non-DCA Greenplum binaries installation, refer to the section above.
- Download or copy the installer file to the Greenplum Database master host.
- As root, run the Pivotal DCA installer for 4.3.x.x on the Greenplum Database master host and specify the file hostfile that lists all hosts in the cluster. If necessary, copy hostfile to the directory containing the installer before running the installer. This sample command runs the installer for Greenplum Database 188.8.131.52 after giving execute permissions:
# chmod +x greenplum-db-appliance-184.108.40.206-build-1-RHEL5-x86_64.bin # ./greenplum-db-appliance-220.127.116.11-build-1-RHEL5-x86_64.bin hostfile
The file hostfile is a text file that lists all hosts in the cluster, one hostname per line.
- Verify if the symbolic link (/usr/local/greenplum-db) is pointing to the new installation on all the hosts (master, standby and segment hosts). If it is, then you can go to the next step. If not, update the Greenplum Database environment so it is referencing your new 4.3.x.x installation.
- Update thegreenplum-db symbolic link on the master and standby master to point to the new 18.104.22.168 installation directory. For example (as root):
# rm -rf /usr/local/greenplum-db # ln -s /usr/local/greenplum-db-22.214.171.124 /usr/local/greenplum-db # chown -R gpadmin /usr/local/greenplum-db
- On a DCA system, the "ln" command would specify the install directory created by the DCA installer. An example is shown below:
# ln -s /usr/local/GP-126.96.36.199 /usr/local/greenplum-db
- Usinggpssh, also update thegreenplum-db symbolic link on all of your segment hosts. For example (as root):
# gpssh -f segment_hosts_file => rm -rf /usr/local/greenplum-db => ln -s /usr/local/greenplum-db-188.8.131.52 /usr/local/greenplum-db => chown -R gpadmin /usr/local/greenplum-db => exit
- On a DCA system, the "ln" command would specify the install directory created by the DCA installer. For example:
=> ln -s /usr/local/GP-184.108.40.206 /usr/local/greenplum-db
- Source the path file from your new 4.3.x.x installation. For example:
$ source /usr/local/greenplum-db-220.127.116.11/greenplum_path.sh
- On a DCA system, the path to the file would be similar to /usr/local/GP-18.104.22.168/ greenplum_path.sh.
- Start the database
If you are upgrading a version of Greenplum Database between 4.3.0 and 4.3.2, check your Greenplum Database for inconsistencies due to an incorrect conversion of 4.2.x append-only tables to 4.3.x append-optimized tables.
IMPORTANT NOTE: The Greenplum Database system must be started but should not be running any SQL commands while the utility is running.
- Run the fix_ao_upgrade.py utility with the option --report. The following is an example.
$ $GPHOME/share/postgresql/upgrade/fix_ao_upgrade.py --host=mdw --port=5432 --report
- If the utility displays a list of inconsistencies, fix them by running the fix_ao_upgrade.py utility without the --report option.
$ $GPHOME/share/postgresql/upgrade/fix_ao_upgrade.py --host=mdw --port=5432
- (Optional step) Run the fix_ao_upgrade.py utility with the option --report again. No inconsistencies should be reported.
If you are utilizing Data Domain Boost, you have to re-enter your DD Boost credentials after upgrading from Greenplum Database 4.3.x to latest 4.3.x as follows:
gpcrondump --ddboost-host ddboost_hostname --ddboost-user ddboost_user --ddboost-backupdir backup_directory
Note: If you do not re-enter your login credentials after an upgrade, your backup will never start because the Greenplum Database cannot connect to the Data Domain system. You will receive an error advising you to check your logon credentials.