show-raft v5

Shows BDR Raft (consensus protocol) details.

Synopsis

Shows BDR Raft (consensus protocol) details such as Raft instance id, Raft state (leader, follower), and Raft term. If Raft is enabled at subgroup level, then that subgroup's Raft instance is also shown.

In some cases, such as network partition, output might vary based on the node to which the CLI is connected.

pgd show-raft [flags]

Examples

  Example 1 (multi-group cluster with subgroup Raft and with witness,
  logical standby, subscriber-only nodes)
  Note: Unlike data or witness node, logical standby and subscriber-only
  nodes don't have Raft voting rights (see Voting Nodes column).

  $ pgd show-raft

  Instance Group    Node               Raft State    Raft Term Commit Index Nodes Voting Nodes Protocol Version
  -------- -----    ----               ----------    --------- ------------ ----- ------------ ----------------
  1        bdrgroup bdr-b1             RAFT_LEADER   0         383          10    7            5000
  1        bdrgroup bdr-a1             RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup bdr-a2             RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup bdr-b2             RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup logical-standby-a1 RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup logical-standby-b1 RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup subscriber-only-c1 RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup witness-a          RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup witness-b          RAFT_FOLLOWER 0         383          10    7            5000
  1        bdrgroup witness-c          RAFT_FOLLOWER 0         383          10    7            5000
  2        group_a  witness-a          RAFT_LEADER   1         2            4     3            0
  2        group_a  bdr-a1             RAFT_FOLLOWER 1         2            4     3            0
  2        group_a  bdr-a2             RAFT_FOLLOWER 1         2            4     3            0
  2        group_a  logical-standby-a1 RAFT_FOLLOWER 1         2            4     3            0
  3        group_b  witness-b          RAFT_LEADER   1         2            4     3            0
  3        group_b  bdr-b1             RAFT_FOLLOWER 1         2            4     3            0
  3        group_b  bdr-b2             RAFT_FOLLOWER 1         2            4     3            0
  3        group_b  logical-standby-b1 RAFT_FOLLOWER 1         2            4     3            0

Options

  -h, --help   help for show-raft

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