|
2 | 2 |
|
3 | 3 | ## Cluster information functions
|
4 | 4 |
|
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. |
6 | 6 | * id, integer - node ID.
|
7 | 7 | * 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].
|
8 | 8 | * connected, bool - shows that node connected to our walsender.
|
|
21 | 21 | * connectivityMask - bitmask representing connectivity to neighbor nodes. Each bit means connection to node.
|
22 | 22 | * nHeartbeats - number of hearbeat responses received from that node.
|
23 | 23 |
|
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. |
41 | 46 |
|
42 | 47 |
|
43 | 48 | ## Node management functions
|
|
0 commit comments