create-proxy v5

Creates proxy in the EDB Postgres Distributed cluster.

Synopsis

Creates proxy in the EDB Postgres Distributed cluster and attaches it to the given group. The proxy name must be unique across the cluster and match with the name given in the corresponding proxy config file.

Use the proxy mode to route connections to Write Leader (default), Read Nodes (read-only), or both (any). Proxy listens on 'listen_port' for Write Leader connections while on 'read_listen_port' for Read Nodes connections.

pgd create-proxy [flags]

Examples

  Example 1 (attach new proxy called proxy-a1 to group group_a, with 'default' mode)

  $ pgd create-proxy --proxy-name proxy-a1 --group-name group_a
  proxy created successfully

  Example 2 (attach new proxy called proxy-b1 to group group_b, with 'any' mode)

  $ pgd create-proxy --proxy-name proxy-b1 --group-name group_b --proxy-mode any
  proxy created successfully

Options

      --group-name string   group name
  -h, --help                help for create-proxy
      --proxy-mode string   proxy mode (default, read-only, any); proxy will route connections to -
                            default - Write Leader
                            read-only - Read Nodes
                            any - both Write Leader and Read Nodes (default "default")
      --proxy-name string   proxy name

Options inherited from parent commands

  -f, --config-file string   config file; ignored if
                             --dsn flag is present (default "/etc/edb/pgd-cli/pgd-cli-config.yml")
      --dsn string           database connection string
                             e.g."host=bdr-a1 port=5432 dbname=bdrdb user=postgres "
  -L, --log-level string     logging level: debug, info, warn, error (default "error")
  -o, --output string        output format: json, yaml