399 Star 1.3K Fork 1.5K

GVPopenGauss / openGauss-server

 / 详情

待办的 【业务范畴:开源】【测试类型:SQL功能】【测试活动:社区】【测试版本:2.0.0】【特性名称:xlog归档】【环境:裸机】主备切换后新主机归档异常

已取消
缺陷
创建于  
2021-08-27 17:49

【标题描述】:主备切换后新主机归档异常
【测试类型: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,存在断档,且归档耗时长
【原因分析】:

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

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

【测试代码】:

评论 (3)

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.

wangxiang 创建了缺陷
wangxiang 负责人设置为Cross-罗
wangxiang 关联仓库设置为openGauss/openGauss-server
wangxiang 关联分支设置为master
wangxiang 优先级设置为主要
zhangxubo 添加了
 
sig/storageengine
标签
wangxiang 修改了描述
pengjiong 优先级主要 修改为次要
展开全部操作日志

长时间未复现,降级为次要,继续跟踪

备机归档方案调整 此问题单取消

wangxiang 任务状态已完成 修改为已取消

登录 后才可以发表评论

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

搜索帮助