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.
This commit is contained in:
Alvaro Herrera 2016-04-04 18:12:12 -03:00
parent 3c69b33f45
commit 890614d2b3

View file

@ -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);
}