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
.
Perform the following steps after running gpupgrade
:
Determine if the gpupgrade
process succeeded or failed.
If the gpupgrade
process failed:
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.
Restart the PXF that was running in your Greenplum Database 5.x installation.
gpadmin@gpmaster$ /usr/local/pxf-gp5/bin/pxf cluster start
You may choose to uninstall the PXF for Greenplum 6 package.
Exit this procedure.
If the gpupgrade
process succeeded, perform the remaining steps in this procedure.
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.
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
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
Start the PXF installed for Greenplum Database 6.x.
gpadmin@gpmaster$ /usr/local/pxf-gp6/bin/pxf cluster start
Update the $PATH
in .bashrc
or .bash_profile
shell initialization scripts, replacing any occurrences of /usr/local/pxf-gp5
with /usr/local/pxf-gp6
.
Verify that PXF can access each external data source by querying external tables that specify each PXF server configuration.
(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
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.