1-- 查看 kingbase.auto.conf 文件内容
2test=# \! cat /data/kingbase.auto.conf
3# Do not edit this file manually!
4
5> **本章目标**:掌握本章核心知识点
6> **前置要求**:完成前序章节学习
7> **预计时长**:60 分钟
8
9# It will be overwritten by the ALTER SYSTEM command.
10
11-- 查看当前参数值
12test=# show work_mem;
13 work_mem
14----------
15 4MB
16(1 行记录)
17
18-- 执行命令,此时没有任何变化
19test=# ALTER SYSTEM SET work_mem TO DEFAULT;
20ALTER SYSTEM
21test=# show work_mem;
22 work_mem
23----------
24 4MB
25(1 行记录)
26
27test=# \! cat /data/kingbase.auto.conf
28# Do not edit this file manually!
29# It will be overwritten by the ALTER SYSTEM command.
30
31-- 先手动设置 work_mem 参数值并加载参数值,此时 conf 文件中有了 work_mem 参数的配置
32test=# alter system set work_mem='8MB';
33ALTER SYSTEM
34test=# show work_mem;
35 work_mem
36----------
37 4MB
38(1 行记录)
39
40test=# \! sys_ctl reload
41服务器进程发出信号
42test=# show work_mem;
43 work_mem
44----------
45 8MB
46(1 行记录)
47
48test=# \! cat /data/kingbase.auto.conf
49# Do not edit this file manually!
50# It will be overwritten by the ALTER SYSTEM command.
51work_mem = '8MB'