@@ -83,8 +83,8 @@ extractPageMap(const char *archivedir, XLogRecPtr startpoint, TimeLineID tli,
83
83
errormsg );
84
84
else
85
85
elog (ERROR , "could not read WAL record at %X/%X" ,
86
- (uint32 ) (startpoint >> 32 ),
87
- (uint32 ) (startpoint ));
86
+ (uint32 ) (errptr >> 32 ),
87
+ (uint32 ) (errptr ));
88
88
}
89
89
90
90
extractPageInfo (xlogreader );
@@ -139,17 +139,13 @@ validate_wal(pgBackup *backup,
139
139
}
140
140
141
141
if (errormsg )
142
- elog (ERROR , "stop check WALs because could not read WAL record at %X/%X: %s\nend time:%s end xid:" XID_FMT ,
142
+ elog (ERROR , "could not read WAL record at %X/%X: %s" ,
143
143
(uint32 ) (errptr >> 32 ), (uint32 ) (errptr ),
144
- errormsg ,
145
- timestamp ,
146
- last_xid );
144
+ errormsg );
147
145
else
148
- elog (ERROR , "could not read WAL record at %X/%X\nend time:%s end xid:" XID_FMT ,
146
+ elog (ERROR , "could not read WAL record at %X/%X" ,
149
147
(uint32 ) (errptr >> 32 ),
150
- (uint32 ) (errptr ),
151
- timestamp ,
152
- last_xid );
148
+ (uint32 ) (errptr ));
153
149
}
154
150
155
151
timestamp_record = getRecordTimestamp (xlogreader , & last_time );
@@ -214,15 +210,19 @@ SimpleXLogPageRead(XLogReaderState *xlogreader, XLogRecPtr targetPagePtr,
214
210
XLogFileName (xlogfname , private -> tli , xlogreadsegno );
215
211
snprintf (xlogfpath , MAXPGPATH , "%s/%s" , private -> archivedir ,
216
212
xlogfname );
217
- elog (LOG , "opening WAL segment \"%s\"" , xlogfpath );
218
-
219
- xlogreadfd = open (xlogfpath , O_RDONLY | PG_BINARY , 0 );
220
213
221
- if (xlogreadfd < 0 )
214
+ if (fileExists ( xlogfpath ) )
222
215
{
223
- elog (INFO , "could not open WAL segment \"%s\": %s" ,
224
- xlogfpath , strerror (errno ));
225
- return -1 ;
216
+ elog (LOG , "opening WAL segment \"%s\"" , xlogfpath );
217
+
218
+ xlogreadfd = open (xlogfpath , O_RDONLY | PG_BINARY , 0 );
219
+
220
+ if (xlogreadfd < 0 )
221
+ {
222
+ elog (INFO , "could not open WAL segment \"%s\": %s" ,
223
+ xlogfpath , strerror (errno ));
224
+ return -1 ;
225
+ }
226
226
}
227
227
}
228
228
0 commit comments