Install PXF on every host in your WarehousePG (WHPG) cluster, including the coordinator, standby coordinator, and all segment hosts.
Prerequisites
- WarehousePG installed on every host in the cluster, running on RHEL 7 (WHPG 6.x only), 8, or 9.
- Java 8 or 11 installed on every host in the cluster.
Installing PXF
Install the PXF package on the coordinator, standby coordinator, and all segment hosts. Run these steps as gpadmin on the coordinator.
On the coordinator, download the package from the EDB repository:
export EDB_SUBSCRIPTION_TOKEN=<your-token> curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/gpsupp/setup.rpm.sh" | sudo -E bash sudo dnf download edb-whpg<whpg_major_version>-pxf-<version>
Where
<whpg_major_version>is your WHPG version,6or7.Create a file
all_hostslisting the coordinator, standby coordinator, and all segment hosts:cdw scdw sdw1 sdw2 sdw3
If you haven't already, install Java on every host. For example, to install Java 8:
gpssh -f all_hosts -u gpadmin -e "sudo dnf -y install java-1.8.0-openjdk-devel"
Copy the package to all hosts in the WHPG cluster, replacing
<el_version>with your OS version:gpsync -f all_hosts edb-whpg7-pxf-<version>.<el_version>.x86_64.rpm =:/tmp/
gpscp -f all_hosts edb-whpg6-pxf-<version>.<el_version>.x86_64.rpm =:/tmp/
Install the package on all hosts:
gpssh -f all_hosts -u gpadmin -e "sudo dnf install -y /tmp/edb-whpg<whpg_major_version>-pxf-<version>.<el_version>.x86_64.rpm"
The installation creates
/usr/local/edb-whpg<whpg_major_version>-pxf. You'll set this variable as the$PXF_HOMEenvironment variable when Configuring and starting PXF.Set ownership of
$PXF_HOMEon every host, sogpadmincan run PXF:gpssh -f all_hosts -u gpadmin -e "sudo chown -R gpadmin:gpadmin /usr/local/edb-whpg<whpg_major_version>-pxf"
Next steps
See Configuring and starting PXF to set up and start the PXF service across your cluster. If you plan to query through pxf_fdw instead of pxf:// external tables, see Using the foreign data wrapper for its own package requirements.