diff options
Diffstat (limited to 'src/backend/access/transam/xlogrecovery.c')
-rw-r--r-- | src/backend/access/transam/xlogrecovery.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c index f6f894b36d1..f4aeda771c0 100644 --- a/src/backend/access/transam/xlogrecovery.c +++ b/src/backend/access/transam/xlogrecovery.c @@ -3339,13 +3339,21 @@ retry: (errmsg_internal("%s", xlogreader->errormsg_buf))); /* reset any error XLogReaderValidatePageHeader() might have set */ - xlogreader->errormsg_buf[0] = '\0'; + XLogReaderResetError(xlogreader); goto next_record_is_invalid; } return readLen; next_record_is_invalid: + + /* + * If we're reading ahead, give up fast. Retries and error reporting will + * be handled by a later read when recovery catches up to this point. + */ + if (xlogreader->nonblocking) + return XLREAD_WOULDBLOCK; + lastSourceFailed = true; if (readFile >= 0) |