Upgrading from an Earlier WarehousePG 6 Release v6.27.4
The upgrade path supported for this release is WarehousePG 6.x to a newer WarehousePG 6.x release.
Important Set the WarehousePG timezone to a value that is compatible with your host systems. Setting the WarehousePG timezone prevents WarehousePG from selecting a timezone each time the cluster is restarted and sets the timezone for the WarehousePG coordinator and segment instances. After you upgrade to this release and if you have not set a WarehousePG timezone value, verify that the selected WarehousePG timezone is acceptable for your deployment. See Configuring Timezone and Localization Settings for more information.
Prerequisites
Before starting the upgrade process, perform the following checks.
Verify the health of the WarehousePG host hardware, and verify that the hosts meet the requirements for running WarehousePG. The WarehousePG
gpcheckperfutility can assist you in confirming the host requirements.Note If you need to run the
gpcheckcatutility, run it a few weeks before the upgrade during a maintenance period. If necessary, you can resolve any issues found by the utility before the scheduled upgrade.The utility is in
$GPHOME/bin. Place WarehousePG in restricted mode when you run thegpcheckcatutility. See the WarehousePG Utility Guide for information about thegpcheckcatutility.If
gpcheckcatreports catalog inconsistencies, you can rungpcheckcatwith the-goption to generate SQL scripts to fix the inconsistencies.After you run the SQL scripts, run
gpcheckcatagain. You might need to repeat the process of runninggpcheckcatand creating SQL scripts to ensure that there are no inconsistencies. Run the SQL scripts generated bygpcheckcaton a quiescent system. The utility might report false alerts if there is activity on the system.If you have configured the WarehousePG Platform Extension Framework (PXF) in your previous WarehousePG installation, you must stop the PXF service, and you might need to back up PXF configuration files before upgrading to a new version of WarehousePG. Refer to PXF Pre-Upgrade Actions for instructions.
If you have not yet configured PXF, no action is necessary.
Upgrading from 6.x to a Newer 6.x Release
An upgrade from WarehousePG 6.x to a newer 6.x release involves stopping WarehousePG, updating the WarehousePG software binaries, and restarting WarehousePG. If you are using WarehousePG extension packages there are additional requirements. See Prerequisites in the previous section.
Note
Starting from WarehousePG 6.27.4, the default installation directory is /usr/edb/whpg6. For backward compatibility, symlinks are provided at /usr/local/greenplum-db and /usr/local/greenplum-db-clients.
Log in to your WarehousePG coordinator host as the WarehousePG administrative user:
$ su - gpadmin
Perform a smart shutdown of your WarehousePG 6.x system (there can be no active connections to the database). This example uses the
-aoption to deactivate confirmation prompts:$ gpstop -a
Copy the new WarehousePG software installation package to the
gpadminuser's home directory on each coordinator, standby, and segment host.If you used
yumoraptto install WarehousePG to the default location, run these commands on each host to upgrade to the new software release.For RHEL/CentOS systems:
$ sudo yum upgrade ./greenplum-db-<version>-<platform>.rpm
For Ubuntu systems:
# apt install ./greenplum-db-<version>-<platform>.deb
The
yumoraptcommand installs the new WarehousePG software files into a version-specific directory under/usr/edb/whpg6and updates the symbolic link/usr/local/greenplum-dbto point to the new installation directory.If you used
rpmto install WarehousePG to a non-default location on RHEL/CentOS systems, runrpmon each host to upgrade to the new software release and specify the same custom installation directory with the--prefixoption. For example:$ sudo rpm -U ./greenplum-db-<version>-<platform>.rpm --prefix=<directory>
The
rpmcommand installs the new WarehousePG software files into a version-specific directory under the<directory>you specify, and updates the symbolic link<directory>/greenplum-dbto point to the new installation directory.Update the permissions for the new installation. For example, run this command as
rootto change the user and group of the installed files togpadmin.$ sudo chown -R gpadmin:gpadmin /usr/edb/whpg*
If needed, update the
greenplum_path.shfile on the coordinator and standby coordinator hosts for use with your specific installation. These are some examples.If WarehousePG uses LDAP authentication, edit the
greenplum_path.shfile to add the line:export LDAPCONF=/etc/openldap/ldap.conf
If WarehousePG uses PL/Java, you might need to set or update the environment variables
JAVA_HOMEandLD_LIBRARY_PATHingreenplum_path.sh.Note When comparing the previous and new
greenplum_path.shfiles, be aware that installing some WarehousePG extensions also updates thegreenplum_path.shfile. Thegreenplum_path.shfrom the previous release might contain updates that were the result of installing those extensions.
Edit the environment of the WarehousePG superuser (
gpadmin) and make sure you are sourcing thegreenplum_path.shfile for the new installation. For example change the following line in the.bashrcor your chosen profile file:source /usr/local/greenplum-db-<current_version>/greenplum_path.sh
to:
source /usr/edb/whpg6/greenplum_path.sh
Or if you are sourcing a symbolic link (
/usr/local/greenplum-db) in your profile files, update the link to point to the newly installed version. For example:$ sudo rm /usr/local/greenplum-db $ sudo ln -s /usr/edb/whpg6 /usr/local/greenplum-db
Source the environment file you just edited. For example:
$ source ~/.bashrc
After all segment hosts have been upgraded, log in as the
gpadminuser and restart your WarehousePG cluster:# su - gpadmin $ gpstart
Re-install WarehousePG extensions. If you were previously using any WarehousePG extensions such as pgcrypto, PL/R, PL/Java, or PostGIS, download the corresponding packages and install using this utility. See the extension documentation for details.
Also copy any files that are used by the extensions (such as JAR files, shared object files, and libraries) from the previous version installation directory to the new version installation directory on the coordinator and segment host systems.
If you configured PXF in your previous WarehousePG installation, you may need to install PXF in your new WarehousePG installation, and you may be required to re-initialize or register the PXF service after you upgrade WarehousePG. Refer to the Step 2 PXF upgrade procedure for instructions.
After upgrading WarehousePG, ensure that all features work as expected. For example, test that backup and restore perform as expected, and WarehousePG features such as user-defined functions, and extensions such as MADlib and PostGIS perform as expected.