2024-12-13
vastbase从恢复中启动数据库报错FATAL: WAL ends before end of online backup
vastbase恢复报错
进行完vastbase的独占模式备份,然后创建恢复recovery.conf文件,从恢复中拉起数据库实例报错
报错信息FATAL: WAL ends before end of online backup,HINT: Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and all WAL up to that point must be available at recovery.
报错源码位置
/*
* Complain if we did not roll forward far enough to render the backup
* dump consistent. Note: it is indeed okay to look at the local variable
* minRecoveryPoint here, even though ControlFile->minRecoveryPoint might
* be further ahead --- ControlFile->minRecoveryPoint cannot have been
* advanced beyond the WAL we processed.
*/
if (t_thrd.xlog_cxt.InRecovery && (XLByteLT(EndOfLog, t_thrd.xlog_cxt.minRecoveryPoint) ||
!XLogRecPtrIsInvalid(t_thrd.shemem_ptr_cxt.ControlFile->backupStartPoint))) {
if (reachedStopPoint) {
/* stopped because of stop request */
ereport(FATAL, (errmsg("requested recovery stop point is before consistent recovery point")));
}
/*
* Ran off end of WAL before reaching end-of-backup WAL record, or
* minRecoveryPoint. That's usually a bad sign, indicating that you
* tried to recover from an online backup but never called
* pg_stop_backup(), or you didn't archive all the WAL up to that
* point. However, this also happens in crash recovery, if the system
* crashes while an online backup is in progress. We must not treat
* that as an error, or the database will refuse to start up.
*/
if (t_thrd.xlog_cxt.ArchiveRecoveryRequested || t_thrd.shemem_ptr_cxt.ControlFile->backupEndRequired) {
if (t_thrd.shemem_ptr_cxt.ControlFile->backupEndRequired) {
ereport(FATAL,
(errmsg("WAL ends before end of online backup"),
errhint("All WAL generated while online backup was taken must be available at recovery.")));
} else if (!XLogRecPtrIsInvalid(t_thrd.shemem_ptr_cxt.ControlFile->backupStartPoint)) {
ereport(FATAL,
(errmsg("WAL ends before end of online backup"),
errhint(
"Online backup started with pg_start_backup() must be ended with pg_stop_backup(), and "
"all WAL up to that point must be available at recovery.")));
} else {
ereport(FATAL, (errmsg("WAL ends before consistent recovery point")));
}
}
}
复制
根据日志已知道变量
t_thrd.shemem_ptr_cxt.ControlFile->backupEndRequired false
!XLogRecPtrIsInvalid(t_thrd.shemem_ptr_cxt.ControlFile->backupStartPoint) true
t_thrd.xlog_cxt.ArchiveRecoveryRequested true
不确定变量的值,根据最后的日志获取,但不确定最后的
t_thrd.xlog_cxt.minRecoveryPoint 值 lsn 2/47002370
EndOfLog 值 9797894144 lsn 2/48000000
咨询问题
1.为什么会出现这个报错,看日志最后应用的位置是大于minrecoverypoint的
2.当backupEndRequired为false时,进入这个分支,查看全局只有read_backup_label时修改这个值,backup method为pg_start_backup(非独占的为streamed),赋值为false,为什么这样就认为没有backup_end记录了
backupEndRequired
如果 backupEndRequired 为真,我们可以确定正在从备份中恢复,并且在安全启动之前必须查看
一个备份结束记录。如果它为假,但 backupStartPoint 被设置,则在启动时找到了一个 backup_label 文件,
但这可能是来自于一次孤立的 pg_start_backup() 调用的遗留文件,
并没有伴随 pg_stop_backup() 的调用。
复制
我来答
添加附件
收藏
分享
问题补充
3条回答
默认
最新
回答交流
Markdown
请输入正文
提交
相关推荐
DCF是不是分布式库?开源的openGauss没有这个特性吧?
回答 1
开源社区2.1版本已经支持是针对单分片来说的,不同的备节点分配不同的职责,实现故障下的自主选主。
mysql迁移openGauss的方法
回答 3
已采纳
MTKhttps://www.mogdb.io/mtk/
openeuler22.03 lts sp1 安装opengauss 5.0 预安装报错
回答 1
先查看 gscgroup 的属性和权限,确保它被正确安装和配置。
openGauss数据库基本常用的运维命令有哪些?
回答 1
仅供参考:1.熟练系统部署:下载openGauss相关软件包,演练部署过程(包括:实例、用户、角色创建已经权限分配等);2.熟记openGauss相关的操作命令及参数:如:数据库启停、数据库状态检查、
请问openGauss是否支持pgcrypto扩展?
回答 3
针对sm4的加密/解密函数gsdecrypt/gsencrypt有几个疑问:1)函数gsdecrypt/gsencrypt其对应的是什么模式?CBC?如果是CBC模式,IV是在哪里设置?2)在open
修改字段类型为date后,点击刷新变成timestamp(0) without time zone
回答 1
没问题,date类型其实是自动映射到timestamp(0)withouttimezone类型上去了,也就是说,在openGauss里,这两个类型是等价的
openGauss failed to connect Unknown:7654.
回答 4
已采纳
上传附件:postgresql.conf
openGauss社区签署的CLA 协议是什么?
回答 3
操作步骤可参考链接中的:提交issue?https://www.bilibili.com/video/BV1mU4y1z7xi/提交PR?https://www.bilibili.com/video/
openGauss 行列混合存储,其场景如何优先选择才能性能最大化?
回答 1
酷哥整理了一份,欢迎参考、补充:
openGauss 与 postgresql在关键技术有什么区别?
回答 1
可参考,欢迎补充:
问题信息
请登录之后查看
附件列表
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~