EDB Postgres Distributed Command Line Interface¶
The EDB Postgres Distributed Command Line Interface (PGD CLI) is a tool for managing 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 about cluster resources.
See Installing PGD CLI for information about how Trusted Postgres Architect 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¶
pgdis the command name for the PGD command line interface. SeeUse of table access methods (TAMs) in PGD in the command reference for a description of the command
options.
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:
Format |
Considerations |
|---|---|
tabular |
Default format. Presents the data in tabular form. |
json |
Presents the raw data with no formatting. For some commands, the json output might show more data than in the tabular output, such as extra fields and more detailed messages. |
yaml |
Same as json except field order is alphabetical. Experimental and might 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