You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contrib/mmts/doc/functions.md
+18-15Lines changed: 18 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -3,20 +3,23 @@
3
3
## Cluster information functions
4
4
5
5
*`mtm.get_nodes_state()` — Shows the status of all nodes in the cluster.
6
-
* id, integer
7
-
* disabled, bool
8
-
* disconnected, bool
9
-
* catchUp, bool
10
-
* slotLag, bigint
11
-
* avgTransDelay, bigint
12
-
* lastStatusChange, timestamp
13
-
* oldestSnapshot, bigint
14
-
* SenderPid integer
15
-
* SenderStartTime timestamp
16
-
* ReceiverPid integer
17
-
* ReceiverStartTime timestamp
18
-
* connStr text
19
-
* connectivityMask bigint
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.
20
23
21
24
*`mtm.get_cluster_state()` -- Shows the status of the whole cluster.
22
25
* status, text
@@ -43,7 +46,7 @@
43
46
*`conn_str` - Connection string for the new node. For example, for the database `mydb`, user `myuser`, and the new node `node4`, the connection string is `"dbname=mydb user=myuser host=node4"`. Type: `text`
44
47
45
48
46
-
*`mtm.drop_node(node integer, drop_slot bool default false)` -- Excludes a node from the cluster.
49
+
*`mtm.stop_node(node integer, drop_slot bool default false)` -- Excludes a node from the cluster.
47
50
*`node` - ID of the node to be dropped that you specified in the `multimaster.node_id` variable. Type: `integer`
48
51
*`drop_slot` - Optional. Defines whether the replication slot should be dropped together with the node. Set this option to true if you do not plan to restore the node in the future. Type: `boolean` Default: `false`
0 commit comments