Klustron Cluster 元数据表说明
大约 3 分钟
Klustron Cluster 元数据表说明
Table "pg_catalog.pg_cluster_meta"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
-------------------+------+-----------+----------+---------+---------+--------------+-------------
comp_node_id | oid | | not null | | plain | |
cluster_id | oid | | not null | | plain | |
cluster_master_id | oid | | not null | | plain | |
cluster_name | name | | not null | | plain | |
comp_node_name | name | | not null | | plain | |
Indexes:
"pg_cluster_meta_id_index" UNIQUE, btree (comp_node_id), tablespace "pg_global"
Tablespace: "pg_global"
Column Description:
[comp_node_id]
- Unique Id of current CN of current cluster which specified by `cluster_name` associated with `cluster_id`
[cluster_id]
- Unique Id of current cluster which specified by `cluster_name`
[cluster_master_id]
- Unique Id of metadata cluster's master instance, which represent the Read-Write node of the MGR. metadata cluster is a MySQL MGR cluster by the way.
[cluster_name]
- Name of current cluster.
[comp_node_name]
- Name of current Comp-Node.
Table "pg_catalog.pg_cluster_meta_nodes"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
------------+---------+-----------+----------+---------+----------+--------------+-------------
server_id | oid | | not null | | plain | |
cluster_id | oid | | not null | | plain | |
is_master | boolean | | not null | | plain | |
port | integer | | not null | | plain | |
user_name | name | | not null | | plain | |
hostaddr | text | | | | extended | |
passwd | text | | not null | | extended | |
Indexes:
"pg_cluster_meta_nodes_serverid_index" UNIQUE, btree (server_id), tablespace "pg_global"
Tablespace: "pg_global"
Column Description:
[server_id]
- mysql server_id variable value. used as PK to identify the row
[cluster_id]
- owner cluster's id, it's the same for all rows of one such table
[is_master]
- wether the node is the master role
[port]
- port used to connect
[hostaddr]
- ip or dns info used to connect
[user_name]
- user info used to connect
[passwd]
- passwd info used to connect
Table "pg_catalog.pg_computing_node_stat"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------------------+--------------------------+-----------+----------+---------+---------+--------------+-------------
comp_node_id | oid | | not null | | plain | |
num_queries | bigint | | not null | | plain | |
num_1shard_queries | bigint | | not null | | plain | |
num_slow_queries | bigint | | not null | | plain | |
num_rejected_queries | bigint | | not null | | plain | |
num_illegal_queries | bigint | | not null | | plain | |
num_ro_queries | bigint | | not null | | plain | |
num_sent_queries | bigint | | not null | | plain | |
num_recv_res | bigint | | not null | | plain | |
num_txns | bigint | | not null | | plain | |
num_1shard_txns | bigint | | not null | | plain | |
num_ro_txns | bigint | | not null | | plain | |
num_rb_txns | bigint | | not null | | plain | |
num_rb_txns_deadlock | bigint | | not null | | plain | |
accumulated_since | timestamp with time zone | | not null | | plain | |
Indexes:
"pg_comp_node_stat_id_tstz_index" UNIQUE, btree (comp_node_id, accumulated_since), tablespace "pg_global"
Has OIDs: yes
Tablespace: "pg_global"
Column Description:
[comp_node_id]
- Unique Id of current CN of current cluster which specified by `cluster_name` associated with `cluster_id`
[num_queries]
- Number of queries processed by current CN
[num_1shard_queries]
- Number of queries which are sent to single backend shard
[num_slow_queries]
- Number of the slow queries
[num_rejected_queries]
- Number of the queries which CN reject to process
[num_illegal_queries]
- Number of the queries which is illegal, i.e. access priviledges issue, etc
[num_ro_queries]
- Number of the read-only queries
[num_sent_queries]
- Total amount of the queries sent to backend storage shard
[num_recv_res]
- Total amount in bytes of query results received from storage shard
[num_txns]
- Total amount of the transactions processed, including committed, aborted, 2PC or 2PC One-phase
[num_1shard_txns]
- Number of the transactions which its operations only performed in single storage shard
[num_ro_txns]
- Number of the read only transactions
[num_rb_txns]
- Number of the rollback transactions
[num_rb_txns_deadlock]
- Number of the rollback transactions caused by deadlock.
[accumulated_since]
- All stats of this node are accumulated since this timestamp
Table "pg_catalog.pg_ddl_log_progress"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------------------+--------+-----------+----------+---------+---------+--------------+-------------
dbid | oid | | not null | | plain | |
ddl_op_id | bigint | | not null | | plain | |
max_op_id_done_local | bigint | | not null | | plain | |
Indexes:
"pg_ddl_log_dbid_index" UNIQUE, btree (dbid), tablespace "pg_global"
Tablespace: "pg_global"
Column Description:
[dbid]
- Each cluster has one row in kunlun_metadata_db.db_cluster, `dbid` refers to the primary key
[ddl_op_id]
- Replay position of ddl log by current CN
[max_op_id_done_local]
- Max position of ddl log which the ddl is fisrt completed locally, for distributed DDL crash-safe
Table "pg_catalog.pg_shard"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
----------------+--------------------------+-----------+----------+---------+---------+--------------+-------------
name | name | | not null | | plain | |
id | oid | | not null | | plain | |
master_node_id | oid | | not null | | plain | |
num_nodes | integer | | not null | | plain | |
space_volumn | bigint | | not null | | plain | |
num_tablets | oid | | not null | | plain | |
db_cluster_id | oid | | not null | | plain | |
when_created | timestamp with time zone | | not null | | plain | |
Indexes:
"pg_shard_name_index" UNIQUE, btree (name), tablespace "pg_global"
"pg_shard_oid_index" UNIQUE, btree (id), tablespace "pg_global"
Tablespace: "pg_global"
Column Description:
[name]
- storage shard name
[id]
- unique id of each storage shard
[master_node_id]
- master node id of each storage shard
[num_nodes]
- number of node of each storage shard
[space_volumn]
-
[num_tablets]
[db_cluster_id]
- Id of current cluster refers to the primary key of the kunlun_metadata_db.db_cluster
[when_created]
- created time
Table "pg_catalog.pg_shard_node"
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
--------------+--------------------------+-----------+----------+---------+----------+--------------+-------------
id | oid | | not null | | plain | |
port | integer | | not null | | plain | |
shard_id | oid | | not null | | plain | |
svr_node_id | oid | | not null | | plain | |
ro_weight | smallint | | not null | | plain | |
user_name | name | | not null | | plain | |
hostaddr | text | | | | extended | |
passwd | text | | not null | | extended | |
when_created | timestamp with time zone | | | | plain | |
Indexes:
"pg_shard_node_ip_port_svr_index" UNIQUE, btree (hostaddr text_pattern_ops, port, svr_node_id), tablespace "pg_global"
"pg_shard_node_oid_index" UNIQUE, btree (id), tablespace "pg_global"
"pg_shard_node_shardid_index" btree (shard_id), tablespace "pg_global"
Tablespace: "pg_global"
Column Description:
[id]
- unique id of current shard node which associated with the kunlun_metadata_db.shard_nodes.id
[port]
- port shard node listen
[shard_id]
- unique id of shard which associated with the kunlun_metadata_db.shard.id
[svr_node_id]
- Id of the machine the server nested in
[ro_weight]
- When dispatching read only select stmts to a slave, choose the one with max ro_weight of a shard. set it to 0 to disable slave reading to the node
[hostaddr]
- ip info used to connect
[user_name]
- user name used to connect
[passwd]
- passwd info used to connect
[when_created]
- created time