EDB Postgres Distributed Command Line Interface v4

The EDB Postgres Distributed Command Line Interface (PGD CLI) is a tool to manage your EDB Postgres Distributed cluster. It allows you to run commands against EDB Postgres Distributed clusters.

See the Command reference for the available commands to inspect, manage, and get information on cluster resources.

See Installing PGD CLI for information about how TPAexec deploys PGD CLI, how to install PGD CLI on a standalone server manually, and specifying connection strings.

Requirements

The PGD CLI requires postgres superuser privileges to run.

Using the PGD CLI

pgd is the command name for the PGD command line interface. See pgd in the Command reference for a description of the command options. See the following sections for sample use cases.

Specifying a configuration file

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. For example:

  pgd show-nodes -f /opt/my-config.yml

Passing a database connection string

Use the --dsn flag to pass a database connection string directly to a command. You don't need a configuration file if you pass the connection string with this flag. The flag takes precedence if a configuration file is present. For example:

pgd show-nodes --dsn "host=bdr-a1 port=5432 dbname=bdrdb user=postgres "

Specifying the output format

The PGD CLI supports the following output formats:

FormatConsiderations
tabularDefault format. Presents the data in tabular form.
jsonPresents the raw data with no formatting. For some commands, the json output may show more data than shown in the tabular output such as extra fields and more detailed messages.
yamlSame as json except field order is alphabetical. Experimental and may not be fully supported in future versions.

Use the -o or --output flag to change the default output format to json or yaml. For example:

pgd show-nodes -o json

Accessing the command line help

To list the supported commands, enter:

pgd help

For help for a specific command and its parameters, enter pgd help <command_name>. For example:

pgd help show-nodes