Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f25dfe

Browse files
committed
functions description
1 parent53b259c commit1f25dfe

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

‎doc/functions.md

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,62 @@
22

33
##Cluster information functions
44

5-
```mtm.get_nodes_state```
6-
```mtm.get_cluster_state```
7-
```mtm.get_cluster_info```
5+
*`mtm.get_nodes_state()` — show status of nodes in cluster. Returns tuple of following values:
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
20+
21+
*`mtm.get_cluster_state()` -- show whole cluster status
22+
* status, text
23+
* disabledNodeMask, bigint
24+
* disconnectedNodeMask, bigint
25+
* catchUpNodeMask, bigint
26+
* liveNodes, integer
27+
* allNodes, integer
28+
* nActiveQueries, integer
29+
* nPendingQueries, integer
30+
* queueSize, bigint
31+
* transCount, bigint
32+
* timeShift, bigint
33+
* recoverySlot, integer
34+
* xidHashSize, bigint
35+
* gidHashSize, bigint
36+
* oldestXid, bigint
37+
* configChanges, integer
38+
839

940
##Node management functions
1041

11-
```mtm.add_node```
12-
```mtm.drop_node```
13-
```mtm.poll_node```
14-
```mtm.recover_node```
42+
*`mtm.add_node(conn_str text)` -- add node to the cluster.
43+
*`mtm.drop_node(node integer, drop_slot bool default false)` -- exclude node from the cluster.
44+
*`mtm.poll_node(nodeId integer, noWait boolean default FALSE)` -- wait for node to become online.
45+
*`mtm.recover_node(node integer)` -- create replication slot for the node which was previously dropped together with it's slot.
1546

1647
##Data management functions
1748

18-
```mtm.make_table_local```
49+
*`mtm.make_table_local(relation regclass)` -- stop replication for a given table
1950

2051
##Debug functions
2152

22-
```mtm.inject_2pc_error```
23-
```mtm.check_deadlock```
24-
```mtm.start_replication```
25-
```mtm.stop_replication```
26-
```mtm.get_snapshot```
27-
```mtm.get_csn```
28-
```mtm.get_trans_by_gid```
29-
```mtm.get_trans_by_xid```
30-
```mtm.get_last_csn```
31-
```mtm.dump_lock_graph```
53+
*`mtm.get_cluster_info()` -- print some debug info
54+
*`mtm.inject_2pc_error`
55+
*`mtm.check_deadlock`
56+
*`mtm.start_replication`
57+
*`mtm.stop_replication`
58+
*`mtm.get_snapshot`
59+
*`mtm.get_csn`
60+
*`mtm.get_trans_by_gid`
61+
*`mtm.get_trans_by_xid`
62+
*`mtm.get_last_csn`
63+
*`mtm.dump_lock_graph`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp