Installing PGD CLI v4

TPAexec installs and configures PGD CLI on each BDR node, by default. If you wish to install PGD CLI on any non-BDR instance in the cluster, you simply attach the pgdcli role to that instance in TPAexec's configuration file before deploying. See TPAexec for more information.

Installing manually

You can manually install the PGD CLI on any Linux machine using .deb and .rpm packages available from the BDR repository. The package name is edb-pgd-cli. For example:

# for Debian
sudo apt-get install edb-pgd-cli

When the PGD CLI is configured by TPAexec, it connects automatically, but with a manual installation to a standalone EDB Postgres Distributed cluster you need to provide a connection string.

Specifying database connection strings

You can either use a configuration file to specify the database connection strings for your cluster (see following section) or pass the connection string directly to a command (see the sample use case).

Using a configuration file

Use the pgd-config.yml configuration file to specify the database connection string for your cluster. The configuration file should contain the database connection string for at least one BDR node in the cluster. The cluster name is optional and not validated.

For example:

cluster:
  name: cluster-name
  endpoints:
  - "host=bdr-a1 port=5432 dbname=bdrdb user=postgres "
  - "host=bdr-b1 port=5432 dbname=bdrdb user=postgres "
  - "host=bdr-c1 port=5432 dbname=bdrdb user=postgres "

The pgd-config.yml, is located in the /etc/edb directory, by default. The PGD CLI searches for pgd-config.yml in the following locations (precedence order - higher to lower):

  1. /etc/edb (default)
  2. $HOME/.edb
  3. . (working directory)

If you rename the file or move it to another location, specify the new name and location using the optional -f or --config-file flag when entering a command. See the sample use case.