403 Star 1.4K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

执行PLpgSQL函数过程中执行子事务,宕机

待办的
缺陷
创建于  
2024-05-06 14:20

【标题描述】:执行PLpgSQL函数logical_replication_slot_lsn_delta导致宕机
【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:x.x.x】 问题描述

【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
输入图片说明
输入图片说明
【测试环境】(单机/1主x备x级联备):
单机
【被测功能】:

【测试类型】:
功能测试
【数据库版本】(查询命令: gaussdb -V):
5.0.2 build 0db5202f
【预置条件】:
wal_level设置为logical
【操作步骤】(请填写详细的操作步骤):

  1. 创建逻辑复制槽
    SELECT * FROM pg_create_logical_replication_slot('regression_slot', 'mppdb_decoding');
    2.创建表
    CREATE TABLE public.foo(i int);
    insert into public.foo(i) values(1);
  2. 创建plpgsql函数logical_replication_slot_lsn_delta
CREATE OR REPLACE FUNCTION logical_replication_slot_lsn_delta(slot text) RETURNS text AS
$$
 BEGIN
     return location from pg_logical_slot_peek_changes(slot,null,1) limit 1;
 END
$$ language plpgsql;

4.执行PLpgSQL函数logical_replication_slot_lsn_delta
select logical_replication_slot_lsn_delta('regression_slot');

【预期输出】:
正常执行
【实际输出】:
宕机
【原因分析】:

  1. 这个问题的根因
  2. 问题推断过程
  3. 还有哪些原因可能造成类似现象
  4. 该问题是否有临时规避措施
  5. 问题解决方案
  6. 预计修复问题时间

【日志信息】(请附上日志文件、截图、coredump信息):

【测试代码】:

评论 (3)

cathyli 创建了缺陷

Hey @cathyli, 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 @cathyli, 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 .

opengauss_bot 负责人设置为cc_db_dev
cc_db_dev 修改了描述
王恬静 优先级设置为主要
王恬静 添加了
 
qa_db_server
标签
王恬静 添加了
 
qa_sql_syntax
标签

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
13084139 opengauss bot 1686829535
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助