SHOW NODES
The SHOW NODES statement returns the current state of the cluster. Only the superuser can run this statement.
|
|
Examples
To view the current cluster state, run:
SHOW NODES;
This returns a table with information about each node in the cluster:
name | election_state | followers_count | connected_nodes_count | degradation_error
---------------+-----------------+-----------------+-----------------------+-------------------
n_oxla_node_1 | LEADER_FOLLOWER | 0 | 3 |
n_oxla_node_3 | LEADER | 3 | 3 |
n_oxla_node_2 | LEADER_FOLLOWER | 0 | 3 |
(3 rows)
Each row represents the state of an individual node, where:
-
name: Name of the node. -
election_state: Current state of the node (for example,LEADER). -
followers_count: Number of nodes following the leader. Only meaningful for the leader node. -
connected_nodes_count: Total number of connected nodes, including itself. -
degradation_error: Error message if the node is not working correctly. OtherwiseNULL.
|
Related system virtual tables include |