Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c80f817

Browse files
committed
mtm.get_cluster_state docs
1 parent 80b9415 commit c80f817

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

doc/functions.md

+23-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Cluster information functions
44

5-
* `mtm.get_nodes_state()` — Shows the status of all nodes in the cluster.
5+
* `mtm.get_nodes_state()` — Shows the status of nodes in the cluster.
66
* id, integer - node ID.
77
* enabled, bool - shows whether node was excluded from cluster. Node can only be disabled due to missing responses to heartbeats during `heartbeat_recv_timeout`. When node will start responding to hearbeats it will be recovered and turned back to enabled state. Automatic recovery only possible when replication slot is active. Otherwise see section [manual node recovery].
88
* connected, bool - shows that node connected to our walsender.
@@ -21,23 +21,28 @@
2121
* connectivityMask - bitmask representing connectivity to neighbor nodes. Each bit means connection to node.
2222
* nHeartbeats - number of hearbeat responses received from that node.
2323

24-
* `mtm.get_cluster_state()` -- Shows the status of the whole cluster.
25-
* status, text
26-
* disabledNodeMask, bigint
27-
* disconnectedNodeMask, bigint
28-
* catchUpNodeMask, bigint
29-
* liveNodes, integer
30-
* allNodes, integer
31-
* nActiveQueries, integer
32-
* nPendingQueries, integer
33-
* queueSize, bigint
34-
* transCount, bigint
35-
* timeShift, bigint
36-
* recoverySlot, integer
37-
* xidHashSize, bigint
38-
* gidHashSize, bigint
39-
* oldestXid, bigint
40-
* configChanges, integer
24+
* `mtm.collect_cluster_state()` - Collects output of `mtm.get_cluster_state()` from all available nodes. Note: for this function to work pg_hba should also allow ordinary connections (in addition to replication) to node with specified connstring.
25+
26+
* `mtm.get_cluster_state()` - Get info about interanal state of multimaster extension.
27+
* status - Node status. Can be "Initialization", "Offline", "Connected", "Online", "Recovery", "Recovered", "InMinor", "OutOfService".
28+
* disabledNodeMask - bitmask of disabled nodes.
29+
* disconnectedNodeMask - bitmask of disconnected nodes.
30+
* catchUpNodeMask - bitmask of nodes that completed their recovery.
31+
* liveNodes - number of enabled nodes.
32+
* allNodes - number of all nodes added to cluster. Decisions about majority of alive nodes based on that parameter.
33+
* nActiveQueries - number of queries being currently processed on this node.
34+
* nPendingQueries - number of queries avaiting their turn on this node.
35+
* queueSize - size of pending queue in bytes.
36+
* transCount - total amount of replicated transactions processed by this node.
37+
* timeShift - global snapshot shit due to unsynchronized clocks on nodes, usec.
38+
* recoverySlot - during recovery procedure node grabs changes from this node.
39+
* xidHashSize - size of xid2state hash.
40+
* gidHashSize - size of gid2state hash.
41+
* oldestXid - oldest xid on this node.
42+
* configChanges - number of state changes (enabled/disabled) since last reboot.
43+
* stalledNodeMask - bitmask of nodes for which replication slot was dropped.
44+
* stoppedNodeMask - bitmask of nodes that were stopped by `mtm.stop_node()`.
45+
* lastStatusChange - timestamp when last state change happend.
4146

4247

4348
## Node management functions

0 commit comments

Comments
 (0)