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 after running gpupgrade.

Post-gpupgrade Actions

Perform the following steps after running gpupgrade:

  1. Determine if the gpupgrade process succeeded or failed.

  2. If the gpupgrade process failed:

    1. Run the following commands to roll back your PXF installation to its previous state (before you ran pxf-pre-gpupgrade):

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

      Note: The pxf-post-upgrade 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.

    2. Restart the PXF that was running in your Greenplum Database 5.x installation.

      gpadmin@gpmaster$ /usr/local/pxf-gp5/bin/pxf cluster start
      
    3. You may choose to uninstall the PXF for Greenplum 6 package.

    4. Exit this procedure.

  3. If the gpupgrade process succeeded, perform the remaining steps in this procedure.

  4. Configure PXF as though it was a fresh install in Greenplum Database 6.x:

    gpadmin@gpmaster$ export GPHOME=<greenplum6-install-dir>
    gpadmin@gpmaster$ /usr/local/pxf-gp6/bin/pxf-post-gpupgrade
    

    Note: The pxf-post-upgrade script must connect to your running Greenplum Database 6.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.

  5. If you nave not relocated your $PXF_BASE, you must copy the PXF configuration from the PXF Greenplum Database 5.x install location to the PXF Greenplum Database 6.x install location. For example:

    gpadmin@gpmaster$ for dir in conf lib servers keytabs; do
        cp -aiv /usr/local/pxf-gp5/$dir/. /usr/local/pxf-gp6/$dir/
    done
    
  6. Synchronize the PXF configuration from the Greenplum Database master host to the standby and segment hosts:

    gpadmin@gpmaster$ /usr/local/pxf-gp6/bin/pxf cluster sync
    
  7. Start the PXF installed for Greenplum Database 6.x.

    gpadmin@gpmaster$ /usr/local/pxf-gp6/bin/pxf cluster start
    
  8. Update the $PATH in .bashrc or .bash_profile shell initialization scripts, replacing any occurrences of /usr/local/pxf-gp5 with /usr/local/pxf-gp6.

  9. Verify that PXF can access each external data source by querying external tables that specify each PXF server configuration.

  10. (Optional) Uninstall the PXF for Greenplum Database 5 package on every segment host in the GPDB cluster; this operation requires sudo privileges. For example:

    $ yum remove pxf-gp5
    

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