255 Star 675 Fork 495

GVPopenGauss / openGauss-server

 / 详情

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

Done
Bug
Opened this issue  
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信息):

【测试代码】:

Comments (2)

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 created缺陷
wangxiang set assignee to Cross-罗
wangxiang set related repository to openGauss/openGauss-server
wangxiang set branch to master
wangxiang set priority to Main
zhangxubo added
 
sig/storageengine
label
wangxiang changed description
pengjiong changed priority from Main to Secondary
Expand operation logs

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

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
Confirm
参与者(3)
5622128 opengauss bot 1581905080
C++
1
https://git.oschina.net/opengauss/openGauss-server.git
git@git.oschina.net:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

Search