金仓数据库KingbaseES参数设置介绍

参数级别介绍
KingbaseES配置参数共包括以下七个级别(由低到高),其中参数属于sighup及其后续级别的可由用户设置:
参数级别 级别说明
internal 仅支持内部使用
kingbase 仅支持启动时设置
sighup 支持修改配置文件后通过SIGHUP信号更新参数
superuser-backend 超级用户的后台级参数
backend 普通用户的后台级参数
superuser 支持超级用户在线修改的参数
user 支持普通用户在线修改的参数
查看参数以与所属级别的命令如下:
kingbase=# SELECT name,context,short_desc FROM sys_settings ORDER BY context,name;
server_version_num | internal | Shows the server version as an integer.
ssl_library | internal | Name of the SSL library.
wal_block_size | internal | Shows the block size in the write ahead log.
wal_segment_size | internal | Shows the size of write ahead log segments.
allow_system_table_mods | kingbase | Allows modifications of the structure of system tables.
archive_mode | kingbase | Allows archiving of WAL files using archive_command.
autovacuum_freeze_max_age | kingbase | Age at which to autovacuum a table to prevent transaction ID wraparound.
autovacuum_max_workers | kingbase | Sets the maximum number of simultaneously running autovacuum worker processes.
autovacuum_multixact_freeze_max_age | kingbase | Multixact age at which to autovacuum a table to prevent multixact wraparound.
bonjour | kingbase | Enables advertising the server via Bonjour.
bonjour_name | kingbase | Sets the Bonjour service name.
cluster_name | kingbase | Sets the name of the cluster, which is included in the process title.
config_file | kingbase | Sets the server’s main configuration file.
data_directory | kingbase | Sets the server’s data directory.
data_sync_retry | kingbase | Whether to continue running after a failure to sync data files.
dynamic_shared_memory_type | kingbase | Selects the dynamic shared memory implementation used.
event_source | kingbase | Sets the application name used to identify KingbaseES messages in the event log.
external_pid_file | kingbase | Writes the kingbase PID to the specified file.
hba_file | kingbase | Sets the server’s “hba” configuration file.
hot_standby | kingbase | Allows connections and queries during recovery.
huge_pages | kingbase | Use of huge pages on Linux or Windows.
ident_file | kingbase | Sets the server’s “ident” configuration file.
jit_provider | kingbase | JIT provider to use.
listen_addresses | kingbase | Sets the host name or IP address(es) to listen to.
–More–

参数优先级别
KingbaseES 参数配置的方式可以使用配置文件 、数据库服务启动命令、系统命令等方式进行配置,不同的配置方式具备不同的优先级。
下文将按照优先级(数值越大,优先级别越高)从低到高进行介绍参数的10种设置方式。在线配置参数时,具备权限的用户只支持对"sighup"级别及以后的参数进行设置。
1 配置文件
操作方式:
通过编辑器直接操作配置文件kingbase.conf,实现新增、修改、删除配置参数

生效方式:

  1. 重启服务生效;
  2. 通过调用函数sys_reload_conf()重新加载配置文件的方式。

示例:
1)编辑配置文件kingbase.conf,新增如下配置:
work_mem = 6MB
2)在命令行工具ksql下重新加载配置文件,然后查询如下:
kingbase=# show work_mem;
work_mem

4MB
(1 row)

kingbase=# select sys_reload_conf();
sys_reload_conf

t
(1 row)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值