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)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。