If you are running PXF with Greenplum Database 5.x and plan to use gpupgrade for an in-place upgrade to Greenplum Database 6.x, you must perform these steps prior to running gpupgrade.

Pre-gpupgrade Actions

Before you run gpupgrade, perform the following steps:

  1. Upgrade your Greenplum Database 5.x PXF installation to the latest release (6.3.0 or newer); refer to the Upgrading PXF documentation for instructions on upgrading PXF.

  2. Note the PXF version.

  3. Install the Greenplum Database 6-specific PXF package of the same version on every segment host in the cluster. You need only install the PXF package; you do not need to run the pxf cluster prepare or pxf cluster register commands.

  4. Log in to the master host of your Greenplum Database 5.x cluster:

    $ ssh gpadmin@<gpmaster>
    gpadmin@gpmaster$ 
    
  5. Run the following commands to set up your environment; substitute the file system path to your Greenplum 5.x install directory:

    gpadmin@gpmaster$ export GPHOME=<greenplum5-install-dir>
    gpadmin@gpmaster$ /usr/local/pxf-gp5/bin/pxf-pre-gpupgrade
    

    Note: The pxf-pre-gpupgrade script must connect to your running Greenplum Database 5.x cluster. By default, it attempts to connect to the gpadmin database on localhost on port 5432 as the gpadmin user (no password). If you need to customize these settings, refer to Customizing the Greenplum Connection Parameters for instructions on setting environment variables for this purpose.

  6. Stop PXF; note that PXF external tables will be inaccessible during the Greenplum Database upgrade process.

    gpadmin@gpmaster$ /usr/local/pxf-gp5/bin/pxf cluster stop
    
  7. PXF is ready for upgrading by gpupgrade; return to the gpupgrade documentation to upgrade from Greenplum Database 5.x to Greenplum Database 6.x.

Customizing the Greenplum Connection Parameters

The PXF scripts that you run before and after gpupgrade must connect to your running Greenplum Database 5.x or 6.x cluster. By default, the scripts attempt to connect to the gpadmin database on localhost on port 5432 as the gpadmin user, no password. If you need to customize these settings, you can do so by specifying the following environment variables:

Environment Variable Default Value Description
$PGHOST localhost The host name or IP address of the Greenplum Database master host.
$PGPORT 5432 The port number to connect to on the master host.
$PGDATABASE gpadmin The name of the database.
$PGUSER gpadmin The Greenplum Database user name.
$PGPASSWORD none The password for the user.

Refer to the Environment Variables topic in the PostgreSQL documentation for more details.

check-circle-line exclamation-circle-line close-line
Scroll to top icon