Startuplog::->record = Readcheckpointrecord (Xlogreader, Controlfile->checkpoint, 1, true)->record = Readrecord (Xlogreader, Controlfile->checkpoint, LOG, true)->record = Xlogreadrecord (Xlogreader, ControlFile- >checkpoint, &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);//segment file offset |--targetsegmentptr = pageptr-targetpageoff; |--readlen = State->read_page (state, Targetsegmentptr (0?), Xlog_blcksz,controlfile->checkpoint, State->readbuf, &state->readpagetli);- >waitforwaltobecomeavailable (targetsegmentptr (0?) + xlog_blcksz,private->randaccess,1,targetrecptr) ReadFile = Xlogfilereadanytli (targetsegmentptr/xlogsegsize, Debug2,currentsource = = xlog_from_archive? Xlog_frOm_any:currentsource)->FD = Xlogfileread (Segno, Emode, tli,xlog_from_archive or Xlog_from_pg_wal, true)->FD = Basicopenfile (Path, o_rdonly | Pg_binary, 0);->fd = open (FileName, fileflags, FileMode)
PostgreSQL start recovery via checkpoint open Wal file