【标题描述】: gsql补全功能被中断导致内存泄露
【测试类型:SQL功能】
【测试版本:6.0.0-RC1】 问题描述
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
CentOS Linux release 7.9.2009 (Core)
Linux host 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
【测试环境】(单机/1主x备x级联备): 单机
【被测功能】: vsql表名补全
【测试类型】: 功能测试
【数据库版本】(查询命令: gaussdb -V): gaussdb (openGauss 6.0.0-RC1 build e41aae90) compiled at 2024-04-26 16:32:57 commit 0 last mr debug
【预置条件】: 存在大量表名或者其他能拖慢查询的情况
【操作步骤】(请填写详细的操作步骤):
valgrind --leak-check=yes gsql -dpostgres -r
CREATE OR REPLACE FUNCTION create_test_tables(num integer)
RETURNS void AS $$
DECLARE
i integer := 1;
tableName text;
BEGIN
-- 循环从1到num,为每一个数字创建一个表
FOR i IN 1..num LOOP
-- 拼接表名
tableName := 'test_' || i;
-- 使用EXECUTE执行动态SQL语句来创建表
EXECUTE 'CREATE TABLE ' || tableName || ' (id serial PRIMARY KEY, data text)';
END LOOP;
END;
$$ LANGUAGE plpgsql;
SELECT create_test_tables(10000);
ctrl+c
中断补全过程\q
退出gsql【预期输出】: 没有与gsql相关的内存泄漏
【实际输出】:
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息): 无
【测试代码】: 无
Hey @ZimingZhang, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @ZimingZhang, please use the command /sig xxx to add a SIG label to this issue.
For example: /sig sqlengine or /sig storageengine or /sig om or /sig ai and so on.
You can find more SIG labels from Here.
If you have no idea about that, please contact with @zhangxubo , @xiangxinyong .
/sig infra
Hi @ZimingZhang,
if you want to get quick review about your issue, please contact the owner in first: @zhongjun2 , @ailoooong , @ZhengZhenyu , @Nelson , @xiangxinyong ,
and then any of the maintainers: @zhongjun2
and then any of the committers: @zhangxubo , @邦邦邦邦 , @ailoooong , @xiangrumei , @xiangxinyong
if you have any question, please contact the SIG: Infra.
登录 后才可以发表评论