From 4870fa7f68728cb51bc81f3d4f74cd53b1dd76f6 Mon Sep 17 00:00:00 2001 From: Anastasia Date: Fri, 9 Nov 2018 13:59:56 +0300 Subject: [PATCH] more informative error message for failed WAL record read --- src/parsexlog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/parsexlog.c b/src/parsexlog.c index 7f7365f5..ee7b5076 100644 --- a/src/parsexlog.c +++ b/src/parsexlog.c @@ -237,10 +237,11 @@ doExtractPageMap(void *arg) */ if (XLogRecPtrIsInvalid(found)) { - elog(WARNING, "Thread [%d]: could not read WAL record at %X/%X", + elog(WARNING, "Thread [%d]: could not read WAL record at %X/%X. %s", private_data->thread_num, (uint32) (extract_arg->startpoint >> 32), - (uint32) (extract_arg->startpoint)); + (uint32) (extract_arg->startpoint), + (xlogreader->errormsg_buf[0] != '\0')?xlogreader->errormsg_buf:""); PrintXLogCorruptionMsg(private_data, ERROR); } extract_arg->startpoint = found;