SHOW CLUSTER SETTING 语句 用于可以查看一个或多个 cluster settings的值,也可以通过 SET CLUSTER SETTING进行配置

所需权限 Changed in v2.0

root 权限可以使用

概要

图片

Note: 集群设置的SHOW 语句与下面SHOW 语句无关,具体语句如下: SHOW (session variable), SHOW CREATE TABLE, SHOW CREATE VIEW, SHOW USERS, SHOW DATABASES, SHOW COLUMNS, SHOW GRANTS, and SHOW CONSTRAINTS

参数

Parameter Description
any_name cluster setting (case-insensitive)的名字

例子

查看一个Cluster Setting的值

> SHOW CLUSTER SETTING diagnostics.reporting.enabled;
+-------------------------------+
| diagnostics.reporting.enabled |
+-------------------------------+
| true                          |
+-------------------------------+
(1 row)
> SHOW CLUSTER SETTING sql.default.distsql;
+----------------------+
| sql.defaults.distsql |
+----------------------+
|                    1 |
+----------------------+
(1 row)

查看所有Cluster Settings的值

> SHOW ALL CLUSTER SETTINGS;
+-------------------------------+---------------+------+--------------------------------------------------------+
|          name                 | current_value | type | description                                            |
+-------------------------------+---------------+------+--------------------------------------------------------+
| diagnostics.reporting.enabled | true          | b    | enable reporting diagnostic metrics to cockroach labs  |
| ...                           | ...           | ...  | ...                                                    |
+-------------------------------+---------------+------+--------------------------------------------------------+
(24 rows)

See Also