加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PostgreSQL启动恢复通过checkpoint open wal文件

发布时间:2020-12-13 16:35:58 所属栏目:百科 来源:网络整理
导读:StartupLOG::-record = ReadCheckpointRecord(xlogreader,ControlFile-checkPoint,1,true)-record = ReadRecord(xlogreader,LOG,true)-record = XLogReadRecord(xlogreader,errormsg);-readOff = ReadPageInternal(state,ControlFile-checkPoint - (ControlF
StartupLOG::
->record = ReadCheckpointRecord(xlogreader,ControlFile->checkPoint,1,true)
->record = ReadRecord(xlogreader,LOG,true)
->record = XLogReadRecord(xlogreader,&errormsg);
->readOff = ReadPageInternal(state,ControlFile->checkPoint - (ControlFile->checkPoint % XLOG_BLCKSZ),Min(ontrolFile->checkPoint % XLOG_BLCKSZ + SizeOfXLogRecord,XLOG_BLCKSZ));
->|--pageptr=ControlFile->checkPoint - (ControlFile->checkPoint % XLOG_BLCKSZ)
  |--targetPageOff = (pageptr % XLogSegSize);//段文件偏移
  |--targetSegmentPtr = pageptr - targetPageOff;
  |--readLen = state->read_page(state,targetSegmentPtr(0?),XLOG_BLCKSZ,state->readBuf,&state->readPageTLI);
->WaitForWALToBecomeAvailable(targetSegmentPtr(0?) + XLOG_BLCKSZ,private->randAccess,targetRecPtr)
->readFile = XLogFileReadAnyTLI(targetSegmentPtr/XLogSegSize,DEBUG2,currentSource == XLOG_FROM_ARCHIVE ? XLOG_FROM_ANY :currentSource)
->fd = XLogFileRead(segno,emode,tli,XLOG_FROM_ARCHIVE或者XLOG_FROM_PG_WAL,true)
->fd = BasicOpenFile(path,O_RDONLY | PG_BINARY,0);
->fd = open(fileName,fileFlags,fileMode)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读