v1_report_corrupt_page_header.patch
text/x-patch
Filename: v1_report_corrupt_page_header.patch
Type: text/x-patch
Part: 0
Patch
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlog.c | 5 | 0 |
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index edb15fe58d..4fdb23f061 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -12297,8 +12297,13 @@ retry:
*/
if (!XLogReaderValidatePageHeader(xlogreader, targetPagePtr, readBuf))
{
+ if (StandbyMode && xlogreader->errormsg_buf[0] != '\0')
+ {
+ ereport(emode_for_corrupt_record(emode, EndRecPtr),
+ (errmsg_internal("%s", xlogreader->errormsg_buf) /* already translated */ ));
+ }
/* reset any error XLogReaderValidatePageHeader() might have set */
xlogreader->errormsg_buf[0] = '\0';
goto next_record_is_invalid;
}