【标题描述】:
【测试类型:SQL功能/存储功能/接口功能/工具功能/性能/并发/压力长稳/故障注入/安全/资料/编码规范】【测试版本:3.0.3】 问题描述
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a): 麒麟V10 SP2
【测试环境】(单机/1主x备x级联备):1主2备
【被测功能】:使用gs_dump备份表,报错segment fault(core dumped)
【测试类型】: gs_dump -t xxx.xxx -s > bal.sql
【数据库版本】(查询命令: gaussdb -V):
【预置条件】:
【操作步骤】(请填写详细的操作步骤):
【预期输出】:
【实际输出】:core目录并没有生成core文件
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @dyyy, 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 @dyyy, 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 .
core堆栈信息如下
select * from pg_default_acl;信息如下
执行过权限设置:alter default privileges for user xxx grant select on tables to xxx2;
复现用例:
1、创建两个用户,例如test、test2
2、执行alter default privileges for user usr1 grant select on tables to usr2;
查询select * from pg_default_acl;确保结果中有defaclnamespace为0的行
openGauss=# alter default privileges for user test grant select on tables to test1;
ALTER DEFAULT PRIVILEGES
openGauss=# select * from pg_default_acl;
defaclrole | defaclnamespace | defaclobjtype | defaclacl
------------+-----------------+---------------+----------------------------------
16384 | 0 | r | {test=arwdDxt/test,test1=r/test}
(1 row)
3、执行gs_dump
[upgrade@sdr-0001 ~]$ gs_dump postgres -p 15300 -f dump.sql
Segmentation fault
数据库版本:
gaussdb (openGauss 6.0.0 build 995b5e4c) compiled at 2024-05-28 00:10:11 commit 0 last mr
验收过程:
openGauss=# create user test1 identified by 'passwd@123';
CREATE ROLE
openGauss=# create user test identified by 'passwd@123';
CREATE ROLE
openGauss=# alter default privileges for user test grant select on tables to test1;
ALTER DEFAULT PRIVILEGES
openGauss=# alter default privileges for user test grant select on tables to test1;
ALTER DEFAULT PRIVILEGES
openGauss=# select * from pg_default_acl ;
defaclrole | defaclnamespace | defaclobjtype | defaclacl
------------+-----------------+---------------+----------------------------------
16388 | 0 | r | {test1=r/test,test=arwdDxt/test}
(1 row)
gs_dump postgres -p 60019 -f dump.sql
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: Begin scanning database.
Progress: [==================================================] 100% (38/37, cur_step/total_step). finish scanning database
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: Finish scanning database.
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: Start dumping objects
Progress: [==================================================] 100% (4828/4828, dumpObjNums/totalObjNums). dump objects
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: Finish dumping objects
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: dump database postgres successfully
gs_dump[port='60019'][postgres][2024-06-03 15:08:06]: total time: 209 ms
3.0.5版本
3.0.5B009]$ gsql -d postgres -p 60025 -r
gsql ((openGauss 3.0.5 build dd00b538) compiled at 2024-05-29 12:03:03 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.
openGauss=#
openGauss=#
openGauss=# create user test1 identified by 'passwd@123';
CREATE ROLE
openGauss=# create user test identified by 'passwd@123';
CREATE ROLE
openGauss=# alter default privileges for user test grant select on tables to test1;
ALTER DEFAULT PRIVILEGES
openGauss=# select * from pg_default_acl ;
defaclrole | defaclnamespace | defaclobjtype | defaclacl
------------+-----------------+---------------+----------------------------------
16388 | 0 | r | {test1=r/test,test=arwdDxt/test}
(1 row)
openGauss=# exit
openGauss-# \q
[lihj@kwemhisprc01300 3.0.5B009]$ gs_dump postgres -p 60025 -f dump.sql
gs_dump[port='60025'][postgres][2024-06-03 16:35:48]: The total objects number is 420.
gs_dump[port='60025'][postgres][2024-06-03 16:35:48]: [100.00%] 420 objects have been dumped.
gs_dump[port='60025'][postgres][2024-06-03 16:35:48]: dump database postgres successfully
gs_dump[port='60025'][postgres][2024-06-03 16:35:48]: total time: 1975 ms
登录 后才可以发表评论