aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2016-04-04 18:12:12 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2016-04-04 18:12:12 -0300
commit890614d2b35bd20468352043870edc7f24a7b8ec (patch)
treeba3fc4e71be000642853acfd28fdc5c1761a153e
parent3c69b33f459f62fe6db66c386ef12620ea697f74 (diff)
downloadpostgresql-890614d2b35bd20468352043870edc7f24a7b8ec.tar.gz
postgresql-890614d2b35bd20468352043870edc7f24a7b8ec.zip
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.
-rw-r--r--src/backend/access/transam/xlog.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 06cefe2efeb..00140ba8f40 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);
}