pgd raft show v5

Synopsis

The pgd raft show command is used to display the Raft status in the EDB Postgres Distributed cluster. In particular, it lists all nodes in all groups, including the top level group, and their Raft status - leader or follower, number of nodes in the group with them, number of voting nodes in the group, presence of a leader, and the term number.

Syntax

pgd raft show [OPTIONS]

Options

No command specific options. See Global Options.

Examples

Show Raft status

pgd raft show
Output
Group Name Node Name  State         Leader Name Current Term Commit Index Nodes Voting Nodes Protocol Version
---------- ---------- ------------- ----------- ------------ ------------ ----- ------------ ----------------
dc1        node-one   RAFT_LEADER   node-one    4            9            3     3            0
dc1        node-three RAFT_FOLLOWER node-one    4            9            3     3            0
dc1        node-two   RAFT_FOLLOWER node-one    4            9            3     3            0
pgd        node-one   RAFT_LEADER   node-one    17           817564       5     3            5005
pgd        node-three RAFT_FOLLOWER node-one    17           817564       5     3            5005
pgd        node-two   RAFT_FOLLOWER node-one    17           817564       5     3            5005
pgd        sonode2    RAFT_FOLLOWER node-one    17           817564       5     3            5005
pgd        sonode-one RAFT_FOLLOWER node-one    17           817564       5     3            5005

Note that dc1 here is a data group with local routing, and pgd is the top level group with global routing. sonode-one and sonode2 are subscriber-only nodes in the sogroup1 group but that is an Optimized Topology group, and the nodes do not participate in voting for the Raft consensus.

The Protocol Version column shows the version of the Raft protocol in use. The Commit Index column shows the index of the last committed log entry. The Nodes column shows the total number of nodes in the group. The Voting Nodes column shows the number of nodes that participate in the Raft consensus. The State column shows the Raft state of the node - leader or follower. The Leader Name column shows the name of the leader node in the group. The Current Term column shows the current term number.