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

Commit dcc1944

Browse files
Liudmila Mantrovakelvich
Liudmila Mantrova
authored andcommitted
edited function descriptions
1 parent 9926d5d commit dcc1944

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

doc/functions.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22

33
## Cluster information functions
44

5-
* `mtm.get_nodes_state()` — Shows the status of nodes in the cluster.
6-
* id, integer - node ID.
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-
* connected, bool - shows that node connected to our walsender.
9-
* slot_active, bool - node has active replication slot. For a disabled node slot will be active until `max_recovery_lag` will be reached.
10-
* stopped, bool - shows whether replication to this node was stopped by `mtm.stop_node()` function. Stopped node acts as a disabled one, but will not be automatically recovered. Call `mtm.recover_node()` to enable it again.
11-
* catchUp - during recovery shows that node recovered till `min_recovery_lag`.
12-
* slotLag - amount of WALs that replication slot holds for disabled/stoped node. Slot will be dropped whne slotLag reaches `max_recovery_lag`.
13-
* avgTransDelay - average delay to transaction commit imposed by this node, usecs.
14-
* lastStatusChange - last time when node changed it's status (enabled/disabled).
15-
* oldestSnapshot - oldest global snapshot existing on this node.
16-
* SenderPid - pid of WALSender.
17-
* SenderStartTime - time when WALSender was started.
18-
* ReceiverPid - pid of WALReceiver.
19-
* ReceiverStartTime - time when WALReceiver was started.
20-
* connStr - connection string to this node.
21-
* connectivityMask - bitmask representing connectivity to neighbor nodes. Each bit means connection to node.
22-
* nHeartbeats - number of hearbeat responses received from that node.
23-
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.
5+
* `mtm.get_nodes_state()` — Shows the status of nodes in the cluster. Returns a tuple of the following values:
6+
* id, integer - Node ID.
7+
* enabled, bool - Shows whether the node is excluded from the cluster. The node can only be disabled if responses to heartbeats are not received within the `heartbeat_recv_timeout` time interval. When the node starts responding to heartbeats, `multimaster` can automatically restore the node and switch it back to the enabled state. Automatic recovery is only possible if the replication slot is still active. Otherwise, you can restore the node manually.
8+
* connected, bool - Shows whether the node is connected to the WAL sender.
9+
* slot_active, bool - Shows whether the node has an active replication slot. For a disabled node, the slot remains active until the `max_recovery_lag` value is reached.
10+
* stopped, bool - Shows whether replication to this node was stopped by the `mtm.stop_node()` function. A stopped node acts as a disabled one, but cannot be automatically recovered. Call `mtm.recover_node()` to re-enable such a node.
11+
* catchUp - During the node recovery, shows whether the data is recovered up to the `min_recovery_lag` value.
12+
* slotLag - Size of the WAL data that the replication slot holds for a disabled/stopped node. The slot is dropped when `slotLag` reaches the `max_recovery_lag` value.
13+
* avgTransDelay - An average commit delay caused by this node, in microseconds.
14+
* lastStatusChange - Last time when the node changed its status (enabled/disabled).
15+
* oldestSnapshot - The oldest global snapshot existing on this node.
16+
* SenderPid - Process ID of the WAL sender.
17+
* SenderStartTime - WAL sender start time.
18+
* ReceiverPid - Process ID of the WAL receiver.
19+
* ReceiverStartTime - WAL receiver start time.
20+
* connStr - Connection string to this node.
21+
* connectivityMask - Bitmask representing connectivity to neighbor nodes. Each bit represents a connection to node.
22+
* nHeartbeats - Number of heartbeat responses received from this node.
23+
24+
* `mtm.collect_cluster_state()` - Collects the data returned by the `mtm.get_cluster_state()` function from all available nodes. For this function to work, in addition to replication connections, pg_hba.conf must allow ordinary connections to the node with the specified connection string.
25+
26+
* `mtm.get_cluster_state()` - Shows the status of the multimaster extension. Returns a tuple of the following values:
27+
* status - Node status. Possible values are: "Initialization", "Offline", "Connected", "Online", "Recovery", "Recovered", "InMinor", "OutOfService". The <literal>inMinor</literal> status indicates that the corresponding node got disconnected from the majority of the cluster nodes. Even though the node is active, it will not accept write transactions until it is reconnected to the cluster.
28+
* disabledNodeMask - Bitmask of disabled nodes.
29+
* disconnectedNodeMask - Bitmask of disconnected nodes.
30+
* catchUpNodeMask - Bitmask of nodes that completed the recovery.
31+
* liveNodes - Number of enabled nodes.
32+
* allNodes - Number of nodes in the cluster. The majority of alive nodes is calculated based on this parameter.
33+
* nActiveQueries - Number of queries being currently processed on this node.
34+
* nPendingQueries - Number of queries waiting for execution on this node.
35+
* queueSize - Size of the pending query queue, in bytes.
36+
* transCount - The total number of replicated transactions processed by this node.
37+
* timeShift - Global snapshot shift caused by unsynchronized clocks on nodes, in microseconds.
38+
* recoverySlot - The node from which a failed node gets data updates during automatic recovery.
39+
* xidHashSize - Size of xid2state hash.
40+
* gidHashSize - Size of gid2state hash.
41+
* oldestXid - The oldest transaction ID on this node.
42+
* configChanges - Number of state changes (enabled/disabled) since the last reboot.
43+
* stalledNodeMask - Bitmask of nodes for which replication slots were dropped.
44+
* stoppedNodeMask - Bitmask of nodes that were stopped by `mtm.stop_node()`.
45+
* lastStatusChange - Timestamp of the last state change.
4646

4747

4848
## Node management functions

0 commit comments

Comments
 (0)