【标题描述】:分区表,全表更新时存在内存泄露
【测试类型:SQL功能】【测试版本:3.1.0】 分区表,全表更新时存在内存泄露
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
【测试环境】(单机/1主x备x级联备):
单机
【被测功能】:
update
【测试类型】:
功能测试
【数据库版本】(查询命令: gaussdb -V):
【预置条件】:
【操作步骤】(请填写详细的操作步骤):
create table t_1143478(
id serial NOT NULL,
res_id varchar(255) NOT NULL DEFAULT '33' ,
batch_id bigint NOT NULL DEFAULT 0 ,
ds_id bigint ,
db_name varchar(64) NOT NULL DEFAULT '1',primary key (id) )
partition by range(id) (
partition p1 values less than (2001),
partition p2 values less than (4001),
partition p3 values less than (6001),
partition p4 values less than (8001),
partition p5 values less than (MAXVALUE)
);
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
update t_1143478 set db_name = 2 ;
【预期输出】:
观察内存使用,内存没有持续增长
【实际输出】:
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @清风, 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 @清风, 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 @xiangxinyong , @zhangxubo .
5.0.1验证通过
test1=# create table t_1143478(
id serial NOT NULL,
res_id varchar(255) NOT NULL DEFAULT '33' ,
batch_id bigint NOT NULL DEFAULT 0 ,
ds_id bigint ,
db_name varchar(64) NOT NULL DEFAULT '1',primary key (id) )
partition by range(id) (
partition p1 values less than (2001),
partition p2 values less than (4001),
partition p3 values less than (6001),
partition p4 values less than (8001),
partition p5 values less than (MAXVALUE)
);
NOTICE: CREATE TABLE will create implicit sequence "t_1143478_id_seq" for serial column "t_1143478.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t_1143478_pkey" for table "t_1143478"
CREATE TABLE
test1=# insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
insert into t_1143478 (res_id,batch_id,db_name) values(generate_series(1, 10000000),generate_series(1, 10000000),generate_series(1, 10000000));
update t_1143478 set db_name = 2 ;
INSERT 0 10000000
INSERT 0 10000000
INSERT 0 10000000
INSERT 0 10000000
UPDATE 40000000
test1=# select contextname ,parent, totalsize/1024/1024 as totalsize, freesize/1024/1024 as freesize,usedsize/1024/1024 as usedsize from dbe_perf.session_memory_detail where contextname like '%ModifyTable%';
contextname | parent | totalsize | freesize | usedsize
-----------------------------+---------------+-----------+------------------+------------------
ModifyTable_140333975336512 | ExecutorState | .0234375 | .010589599609375 | .012847900390625
(1 row)
test1=# select contextname ,parent, totalsize/1024/1024 as totalsize, freesize/1024/1024 as freesize,usedsize/1024/1024 as usedsize from dbe_perf.session_memory_detail where contextname like '%ModifyTable%';
contextname | parent | totalsize | freesize | usedsize
-----------------------------+---------------+-----------+----------------+----------------
ModifyTable_140333975336512 | ExecutorState | .0234375 | .0184326171875 | .0050048828125
(1 row)
test1=# select contextname ,parent, totalsize/1024/1024 as totalsize, freesize/1024/1024 as freesize,usedsize/1024/1024 as usedsize from dbe_perf.session_memory_detail where contextname like '%ModifyTable%';
contextname | parent | totalsize | freesize | usedsize
-----------------------------+---------------+-----------+--------------+--------------
ModifyTable_140333975336512 | ExecutorState | .0234375 | .01904296875 | .00439453125
(1 row)
test1=# select contextname ,parent, totalsize/1024/1024 as totalsize, freesize/1024/1024 as freesize,usedsize/1024/1024 as usedsize from dbe_perf.session_memory_detail where contextname like '%ModifyTable%';
contextname | parent | totalsize | freesize | usedsize
-----------------------------+---------------+-----------+----------------+----------------
ModifyTable_140333975336512 | ExecutorState | .0234375 | .0184326171875 | .0050048828125
(1 row)
test1=# select contextname ,parent, totalsize/1024/1024 as totalsize, freesize/1024/1024 as freesize,usedsize/1024/1024 as usedsize from dbe_perf.session_memory_detail where contextname like '%ModifyTable%';
contextname | parent | totalsize | freesize | usedsize
-----------------------------+---------------+-----------+-------------------+--------------------
ModifyTable_140333975336512 | ExecutorState | .0234375 | .0189285278320312 | .00450897216796875
登录 后才可以发表评论