obclient> SHOW PARAMETERS LIKE 'max_syslog_file_count'; +-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ | zone2 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone2 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone3 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone1 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | | zone1 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+ 5 rows in set (0.02 sec)
| 对比项 | 系统配置项 | 系统变量 |
|---|---|---|
| 生效范围 | 集群、租户、Zone、机器。 | 租户的 Global 级别或 Session 级别。 |
| 生效方式 | ||
| 修改方式 | 仅支持通过 SQL 语句修改,示例如下:
obclient> SET ob_query_timeout = 20000000;
obclient> SET GLOBAL ob_query_timeout = 20000000; | |
| 持久化 | 持久化到内部表与配置文件,可以在
/home/admin/oceanbase/etc/observer.config.bin 与
/home/admin/oceanbase/etc/observer.config.bin.history 文件中查询该配置项。 |
仅 GLOBAL 级别的变量会持久化,SESSION 级别的变量不会进行持久化。 |
| 生命周期 | 长,从进程启动到退出。 | 短,需要租户的 Schema 创建成功以后才生效。 |
| 查询方式 | 可以使用
SHOW PARAMETERS 语句查询。示例如下:
obclient> SHOW PARAMETERS LIKE 'schema_history_expire_time'; |
可以使用
SHOW [GLOBAL] VARIABLES 或
SELECT 语句查询。 示例如下:
obclient> SHOW VARIABLES LIKE 'ob_query_timeout';
obclient> SHOW GLOBAL VARIABLES LIKE 'ob_query_timeout';
obclient> SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout';
obclient> SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'ob_query_timeout'; |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70026124/viewspace-2932857/ ,如需转载,请注明出处,否则将追究法律责任。