switchover v5

Switches over to new write leader.

Synopsis

Switches over to new write leader. Use switchover method 'fast' for immediate switchover. Use 'strict' to wait until lag is less than 'route_writer_max_lag' on the given target node. If switchover fails due to timeout or any other issue, BDR might elect a write leader that's different from the given target node.

pgd switchover [flags]

Examples

  Example 1 (with required arguments, default method is 'strict' and default
  timeout is '10s')

  $ pgd switchover --group-name group_a --node-name bdr-a1
  switchover is complete


  Example 2 (with optional arguments)

  $ pgd switchover --group-name group_a --node-name bdr-a1 --method strict --timeout 15s
  switchover is complete


  Example 3 (immediate switchover)

  $ pgd switchover --group-name group_a --node-name bdr-a1 --method fast
  switchover is complete

Options

      --group-name string   group name
  -h, --help                help for switchover
      --method string       switchover method (strict, fast)
                            strict - waits until lag on given node is less than route_writer_max_lag
                            fast - immediate switchover, route_writer_max_lag is ignored (default "strict")
      --node-name string    node name
      --timeout duration    timeout period when switchover method is strict (default 10s)

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