已关闭
[Bug]: local_syscache_threshold 设置小于16MB,实际生效 #8270
sungang14创建于  7月7日关闭于  8月8日
sungang14
sungang14成员
7月7日 创建

测试类型

存储功能

测试版本

7.0.0LTS

问题描述

local_syscache_threshold 设置为15MB,实际生效,与资料描述不符
local_syscache_threshold ​
参数说明:系统表cache在单个session缓存的大小。

该参数属于PG_SIGHUP类型参数,请参考表1中对应设置方法进行设置。

如果enable_global_plancache已打开,为保证GPC生效,local_syscache_threshold设置值小于16MB时不会生效,最小为16MB。

如果enable_global_plancache和enable_thread_pool打开,该参数描述的是当前线程和绑定到当前线程上的session缓存的总大小。

取值范围:整型,1*1024 ~ 512*1024,单位kB。

默认值:256MB

操作系统和硬件信息

all

测试环境

企业版主备

被测功能

预置条件

操作步骤

1、tpccdb=# show enable_thread_pool;
enable_thread_pool

off
(1 row)

tpccdb=#
tpccdb=#
tpccdb=# show enable_global_plancache;
enable_global_plancache

off
(1 row)
2、
source /home/func_c_0780/gaussdb.bashrc;gs_guc set -N all -D /home/func_c_0780/cluster/dn1 -c "enable_global_plancache=on";
The gs_guc run with the following arguments: [gs_guc -N all -D /home/func_c_0780/cluster/dn1 -c enable_global_plancache=on set ].
Begin to perform the total nodes: 3.
Popen count is 3, Popen success count is 3, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 3, Command success count is 3, Command failure count is 0.

Total instances: 3. Failed instances: 0.
ALL: Success to perform gs_guc!

[func_c_0780@Testci_069 dn1]$ source /home/func_c_0780/gaussdb.bashrc;gs_guc set -N all -D /home/func_c_0780/cluster/dn1 -c "local_syscache_threshold=15MB";
The gs_guc run with the following arguments: [gs_guc -N all -D /home/func_c_0780/cluster/dn1 -c local_syscache_threshold=15MB set ].
Begin to perform the total nodes: 3.
Popen count is 3, Popen success count is 3, Popen failure count is 0.
Begin to perform gs_guc for datanodes.
Command count is 3, Command success count is 3, Command failure count is 0.

Total instances: 3. Failed instances: 0.
ALL: Success to perform gs_guc!

3、[func_c_0780@Testci_069 dn1]$ source /home/func_c_0780/gaussdb.bashrc; gs_om -t restart

Stopping cluster.

Successfully stopped cluster.

End stop cluster.

Starting cluster.

[SUCCESS] Testci_069
2026-07-07 10:41:30.907 6a4c675a.1 [unknown] 281473102688320 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2026-07-07 10:41:30.908 6a4c675a.1 [unknown] 281473102688320 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load matrix mem dynamic lib error: libubsm_sdk.so, lib not exists
2026-07-07 10:41:30.908 6a4c675a.1 [unknown] 281473102688320 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load UADK AGG dynamic lib for DPA: libwd_dae.so, error: libwd_dae.so: cannot open shared object file: No such file or directory
2026-07-07 10:41:30.908 6a4c675a.1 [unknown] 281473102688320 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: max_imcs_cache * htap_borrow_mem_percent is larger than max_borrow_memory
[SUCCESS] Testci_070
2026-07-07 10:41:32.438 6a4c675c.1 [unknown] 281472690270272 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2026-07-07 10:41:32.439 6a4c675c.1 [unknown] 281472690270272 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load matrix mem dynamic lib error: libubsm_sdk.so, lib not exists
2026-07-07 10:41:32.439 6a4c675c.1 [unknown] 281472690270272 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load UADK AGG dynamic lib for DPA: libwd_dae.so, error: libwd_dae.so: cannot open shared object file: No such file or directory
2026-07-07 10:41:32.439 6a4c675c.1 [unknown] 281472690270272 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: max_imcs_cache * htap_borrow_mem_percent is larger than max_borrow_memory
[SUCCESS] Testci_071
2026-07-07 10:41:33.952 6a4c675d.1 [unknown] 281472799912000 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2026-07-07 10:41:33.952 6a4c675d.1 [unknown] 281472799912000 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load matrix mem dynamic lib error: libubsm_sdk.so, lib not exists
2026-07-07 10:41:33.953 6a4c675d.1 [unknown] 281472799912000 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: load UADK AGG dynamic lib for DPA: libwd_dae.so, error: libwd_dae.so: cannot open shared object file: No such file or directory
2026-07-07 10:41:33.953 6a4c675d.1 [unknown] 281472799912000 [unknown] 0 dn_6001_6002_6003 01000 0 [BACKEND] WARNING: max_imcs_cache * htap_borrow_mem_percent is larger than max_borrow_memory
Waiting for check cluster state...

Successfully started.

4、[func_c_0780@Testci_069 dn1]$ gsql -d tpccdb -p 58189 -r
gsql ((openGauss 7.0.0-RC3 build 1f3d3fc2) compiled at 2026-06-25 00:38:00 commit 981 last mr 9325 release on aarch64-unknown-linux-gnu, compiled by g++ (GCC) 10.3.1, 64-bit)
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.

tpccdb=# cache^C
tpccdb=# ^C
tpccdb=# show local_syscache_threshold;
local_syscache_threshold

15MB
(1 row)

预期输出

步骤3重启失败或者步骤4查询显示16GB

实际输出

步骤3重启成功,步骤4查询显示15GB

日志信息

image.png
image.png

提单组织

测试团队

测试代码

likedislike
sungang14sungang14成员
7月7日 添加了label:bug
opengauss_bot
opengauss_bot成员
7月7日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
7月7日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
7月7日 添加了label:sig/StorageEngine,sig/AI,sig/CM,sig/CloudNative,sig/SecurityTechnology,sig/SQLEngine
opengauss_bot
opengauss_bot成员
7月7日 评论:

Welcome To openGauss Community

Hey @sungang14 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zjh_hw .

likedislike
sungang14sungang14成员
7月7日 issue优先级由 无优先级 改变为 次要
sungang14sungang14成员
7月7日 关联了看板:openGauss 7.0.0-LTS
IIgali成员
7月8日 将 Setname 设为负责人
SetnameWangSetnameWang成员
7月17日 关联了pull request:修复 local_syscache_threshold 参数校验函数丢失的问题
sungang14sungang14成员
7月17日 修改标题为 “[Bug]: local_syscache_threshold 设置小于16B,实际生效”,原标题为“[Bug]: local_syscache_threshold 设置小于16GB,实际生效”
sungang14sungang14成员
7月17日 修改了issue 的描述
sungang14sungang14成员
7月18日 修改标题为 “[Bug]: local_syscache_threshold 设置小于16MB,实际生效”,原标题为“[Bug]: local_syscache_threshold 设置小于16B,实际生效”
SetnameWangSetnameWang成员
7月25日 issue状态由 待办的 改变为 已完成
SetnameWangSetnameWang成员
8月5日 issue状态由 已完成 改变为 待回归
SetnameWang
SetnameWang成员
8月5日 评论:

image.png

likedislike
sungang14sungang14成员
8月8日 修改了issue 的描述
sungang14
sungang14成员
8月8日 评论:

【回归人员】sungang14
【回归日期】2026.8.8
【回归版本】7.0.0B017
【回归结论】通过
【回归步骤】
enable_global_plancache已打开,local_syscache_threshold设置值小于16MB时重启失败
image.png
image.png
image.png
enable_global_plancache为off时,local_syscache_threshold设置15MB成功
image.png
enable_global_plancache为off时,local_syscache_threshold设置1024KB成功
image.png
local_syscache_threshold设置1023KB失败
image.png

likedislike
sungang14sungang14成员
8月8日 issue状态由 待回归 改变为 已验收
sungang14sungang14成员
8月8日 关闭了 issue