Initializing PGD v6.2.0
Once the seed node is upgraded to the target Postgres version, you must install the Bi-Directional Replication (BDR) extension and initialize the cluster to transition the node into a distributed environment.
Installing and configuring PGD
The seed node requires PGD packages that specifically match your Postgres distribution and version (e.g., edb-pgd6-essential-epas17 for PGD Essential on EPAS 17). Ensure you have configured the appropriate PGD repository and PGD edition you want to install (Essential or Expanded) before proceeding. See Installing the database and pgd for details.
To enable the BDR extension, update your Postgres configuration to preload the library and enable commit timestamps on the seed node:
cat >> ${PGDATA}/postgresql.conf <<EOF shared_preload_libraries = 'bdr' track_commit_timestamp = on EOF
Restart Postgres to load the BDR extension:
su -u enterprisedb --command "pg_ctl restart"
Initialize the PGD cluster
With the extension loaded, you can now create the BDR extension within the database you intend to replicate.
On the seed node, create the BDR extension:
CREATE EXTENSION bdr;
Validate BDR is loaded and check the version:
SELECT bdr.bdr_version();
Define the seed node as a BDR node and establish the initial node group that will form your cluster:
SELECT bdr.create_node( node_name := '${SEED_NODE_PGD_NAME}', dsn := '${SEED_NODE_DSN_DSN}' );
Create the node group:
SELECT bdr.create_node_group( node_group_name := '${PGD_CLUSTER_NAME}' );
Configuring PGD CLI
Use the PGD Command Line Interface (CLI) to manage and monitor the cluster. You must create a configuration file on all current and future PGD nodes that lists the connection endpoints for the entire cluster:
mkdir -p /etc/edb/pgd-cli cat <<EOF > tee /etc/edb/pgd-cli/pgd-cli-config.yml cluster: name: ${PGD_CLUSTER_NAME} endpoints: - ${SEED_NODE_DSN} - ${ADD_NODE_DSN} - ... EOF
Validating the PGD Installation
Use the PGD CLI to verify that the single-node setup is healthy and the CLI is correctly configured to communicate with the cluster. On the seed node, run:
pgd nodes list -- Expected to list exactly one node (itself). pgd cluster show --health -- Expected to show OK for all checks.
Next step: Join additional nodes.