【标题描述】:主备切换后新主机归档异常
【测试类型:SQL功能】【测试版本:2.0.0】 主备切换后新主机归档异常
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
CentOS Linux release 7.6.1810 (Core)
Linux ctupx8600096 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
【测试环境】(单机/1主x备x级联备):
1主2备
【被测功能】:
备机xlog归档
【测试类型】:功能测试
【数据库版本】(查询命令: gaussdb –V):
gaussdb (openGauss 2.0.0 build 121f1c25) compiled at 2021-08-24 20:04:31 commit 0 last mr
【预置条件】:
1主2备集群Normal
【操作步骤】(请填写详细的操作步骤):
1.主备查询参数默认值
show synchronous_standby_names;
show synchronous_commit;
show archive_mode;
show archive_dest;
2.1主2备创建xlog归档地址
rm -rf /home/$user/xlog
mkdir /home/$user/xlog
3.备1执行执行switchover 进行主备切换
gs_ctl switchover -D dn1
gs_om -t refreshconf
select pg_switch_xlog();3次
4.备2上执行failover 进行主备切换
gs_ctl failover -D dn1
gs_om -t refreshconf
在新主机上以备机启动
gs_ctl start -D dn1 -M standby
select pg_switch_xlog();3次
5.设置新主机和现备1+2 开启归档设置
gs_guc reload -D {dn1} -c "synchronous_standby_names='*'"
gs_guc reload -D {dn1} -c "archive_mode=on"
gs_guc reload -D {dn1} -c "archive_dest='/home/$user/xlog'"
6.执行切换日志后 查看现主机归档路径 归档文件
select pg_switch_xlog();
ll /home/$user/xlog
【预期输出】:
1.显示默认值
2.成功
3.成功
4.成功
5.成功
6.主机归档当前时间前已完成的所有pg_xlog
【实际输出】:
1.显示默认值
2.成功
3.成功
4.成功
5.成功
6.主机归档未当前时间前已完成的所有pg_xlog,存在断档,且归档耗时长
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @wangxiang, 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 https://gitee.com/opengauss/community/blob/master/contributors/command.en.md to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
长时间未复现,降级为次要,继续跟踪
备机归档方案调整 此问题单取消
登录 后才可以发表评论