How to upgrade Pivotal Greenplum (inside family) from 4.3 to later
search cancel

How to upgrade Pivotal Greenplum (inside family) from 4.3 to later

book

Article ID: 296134

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

GPDB  is on v4.3 and needs to be upgraded to the later version.


Note: The current database could be v4.3.2 or above, this article instructs how to upgrade the GPDB to a higher version. 

Important: If upgrading to v4.3.6.1 and above, the gp_interconnect_type must be UDPIFC. UDP has been deprecated from v4.3.6.1. 


Environment


Resolution

Follow the instructions below for upgrading the GPDB to a later version:
 

Download

  • Download and copy the installer file to the Greenplum Database master host from Pivnet based on the system (DCA or Non-DCA). It is a good practice to copy the installer at the same location. In other words, copy the installer 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 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 explains how to install Greenplum Database 4.3 on non-DCA systems.


1. Download or copy the installer file to the Greenplum Database master host from Pivnet. It is a good practice to copy the installer at the same location where the previous installation exists (default location: /usr/local/). 

2. Unzip the installer file and give the necessary permissions. For example:
# unzip greenplum-db-4.3.5.3-PLATFORM.zip
# chmod +x greenplum-db-4.3.5.3-PLATFORM.bin
3. Launch the installer using bash. For example:
# /bin/bash greenplum-db-4.3.5.3-PLATFORM.bin
4. The installer will prompt you to accept the Greenplum Database license agreement. Type "yes" to accept the license agreement.

5. 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.

6. 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.

7. Source the path file from your new 4.3.x.x installation. The example below changes to the gpadmin user before sourcing the file:
# su - gpadmin 
# source /usr/local/greenplum-db-4.3.5.3/greenplum_path.sh
8. Run the gpseginstall utility to install the v4.3.5.3 binaries on all the segment hosts specified in the host file. For example: 
$ gpseginstall -f hostfile
9. Once done, start the database.


(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.


1. Download or copy the installer file to the Greenplum Database master host.

2. As root, run the Pivotal DCA installer for 4.3.x.x on the Greenplum Database master host and specify the file host file that lists all hosts in the cluster. If necessary, copy hostfile to the directory containing the installer before running the installer. This example 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 go to the next step. If not, update the Greenplum Database environment so it is referencing your new v4.3.x.x installation.
  • Update the greenplum-db symbolic link on the master and standby master to point to the new v4.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 will 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
    
  • Using gpssh, also update the Greenplum-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 on master. For example:
$ source /usr/local/greenplum-db-4.3.5.3/greenplum_path.sh
  • On a DCA system, the path to the file will be similar to /usr/local/GP-4.3.5.3/greenplum_path.sh.

  • Start the database
gpstart -a

Post-upgrade

1. If upgrading a version of Greenplum Database between v4.3.0 and v4.3.2, check your Greenplum Database for inconsistencies due to an incorrect conversion of v4.2.x append-only tables to v4.3.x append-optimized tables.


Note: The Greenplum Database system must be started but should not be running any SQL commands while the utility is running.


2. 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

3. 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

4. (Optional step) Run the fix_ao_upgrade.py utility with the option --report again. No inconsistencies should be reported.


5. If utilizing Data Domain Boost, re-enter your DD Boost credentials after upgrading from Greenplum Database v4.3.x to latest v4.3.x as follows:

gpcrondump --ddboost-host ddboost_hostname --ddboost-user ddboost_user --ddboost-backupdir backup_directory

Note: If login credentials are not re-entered after an upgrade, the backup will never start because the Greenplum Database cannot connect to the Data Domain system. An error message will be received to check your login credentials.
 

6. Use the Greenplum Database gppkg utility to install Greenplum Database extensions. If previously using any Greenplum Database extensions such as pgcrypto, PL/R, PL/Java, PL/Perl, and PostGIS, download the corresponding packages from Pivotal Network. Install the gppkg utility using this utility. See the Greenplum Database 4.3 Utility Guide for gppkg usage details.

Refer release notes of the version you are installing for any additional information.