Pivotal Knowledge Base

Follow

Upgrade Pivotal Greenplum (inside family) from 4.3 to later

Environment

 Product  Version
 Pivotal Greenplum (GPDB)  4.3 and later

Purpose

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 4.3.6.1 and above, make sure that the gp_interconnect_type must be UDPIFC, since UDP has been deprecated from 4.3.6.1. 

Procedure

Follow the instructions for upgrading the GPDB version:

Download

  • 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:

gpstop -af

Installation

  • 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-4.3.5.3-PLATFORM.zip
# chmod +x greenplum-db-4.3.5.3-PLATFORM.bin
  • Launch the installer using bash. For example:
# /bin/bash greenplum-db-4.3.5.3-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-4.3.5.3), 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-4.3.5.3/greenplum_path.sh
  • Run the gpseginstall utility to install the 4.3.5.3 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 4.3.5.3 after giving execute permissions:
    # chmod +x greenplum-db-appliance-4.3.5.3-build-1-RHEL5-x86_64.bin
    # ./greenplum-db-appliance-4.3.5.3-build-1-RHEL5-x86_64.bin hostfile
    

Upgrade

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 4.3.5.3 installation directory. For example (as root):
    # rm -rf /usr/local/greenplum-db
    # ln -s /usr/local/greenplum-db-4.3.5.3 /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-4.3.5.3 /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-4.3.5.3 /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-4.3.5.3 /usr/local/greenplum-db
  • Source the path file from your new 4.3.x.x installation. For example:
    $ source /usr/local/greenplum-db-4.3.5.3/greenplum_path.sh 
    
  • On a DCA system, the path to the file would be similar to /usr/local/GP-4.3.5.3/ greenplum_path.sh.
  • Start the database
gpstart -a

Post-upgrade

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.

Comments

Powered by Zendesk