pgd Command Reference v5.6

pgd is the command name for the PGD command line interface

Synopsis

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. You can use it to inspect and manage cluster resources.

Commands

cluster

events

group

node

proxy

raft

  • list - List Raft nodes

replication

Global Options

FlagLong FlagDescription
-f--config-fileconfig file name.
This is ignored if --dsn flag is present.
Default "/etc/edb/pgd-cli/pgd-cli-config.yml")
--dsndatabase connection string
such as "host=bdr-a1 port=5432 dbname=bdrdb user=postgres"
-h--helphelp for pgd
-L--log-levellogging level: debug, info, warn, error (default "error")
-o--outputoutput format: json, yaml

cluster

show clockskew

Shows the status of clock skew between each BDR node pair

show health

Checks the health of the EDB Postgres Distributed cluster

verify settings

Verifies the EDB Postgres Distributed cluster settings.

verify architecture

Verifies whether the cluster follows the rules as per the AlwaysOn architecture

events

list

Lists events such as background worker errors and node membership changes

group

list

Lists all groups in the EDB Postgres Distributed cluster and their summary

set leader

Switches a group's write leader

set options

Sets group options such as enable_raft, enable_proxy_routing, and location

node

list

Lists all nodes in the EDB Postgres Distributed cluster and their summary.

set options

Sets node options such as `route_fence`, `route_priority`, and `route_writes`

show version

Shows the version of BDR and Postgres installed on each node

proxy

create

Creates proxy in the EDB Postgres Distributed cluster

delete

Deletes proxy from the EDB Postgres Distributed cluster

list

Lists all proxies in the EDB Postgres Distributed cluster and their summary

set options

Sets proxy options such as listen_address, listen_port, and max_client_conn.

raft

list

Lists BDR Raft (consensus protocol) details

replication

show slots

Shows the status of BDR replication slots.

show subscriptions

Shows BDR subscription (incoming replication) details