Skip to content

Commit 4870fa7

Browse files
committed
more informative error message for failed WAL record read
1 parent 141ba33 commit 4870fa7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/parsexlog.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ doExtractPageMap(void *arg)
237237
*/
238238
if (XLogRecPtrIsInvalid(found))
239239
{
240-
elog(WARNING, "Thread [%d]: could not read WAL record at %X/%X",
240+
elog(WARNING, "Thread [%d]: could not read WAL record at %X/%X. %s",
241241
private_data->thread_num,
242242
(uint32) (extract_arg->startpoint >> 32),
243-
(uint32) (extract_arg->startpoint));
243+
(uint32) (extract_arg->startpoint),
244+
(xlogreader->errormsg_buf[0] != '\0')?xlogreader->errormsg_buf:"");
244245
PrintXLogCorruptionMsg(private_data, ERROR);
245246
}
246247
extract_arg->startpoint = found;

0 commit comments

Comments
 (0)