From: Alvaro Herrera Date: Mon, 4 Apr 2016 21:12:12 +0000 (-0300) Subject: Display WAL pointer in rm_redo error callback X-Git-Tag: REL9_6_BETA1~287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=890614d2b35bd20468352043870edc7f24a7b8ec;p=postgresql Display WAL pointer in rm_redo error callback This makes it easier to identify the source of a recovery problem in case of a bug or data corruption. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 06cefe2efe..00140ba8f4 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -10847,7 +10847,11 @@ rm_redo_error_callback(void *arg) initStringInfo(&buf); xlog_outdesc(&buf, record); - errcontext("xlog redo %s", buf.data); + /* translator: %s is an XLog record description */ + errcontext("xlog redo at %X/%X for %s", + (uint32) (record->ReadRecPtr >> 32), + (uint32) record->ReadRecPtr, + buf.data); pfree(buf.data); }