aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-07-03 10:53:44 +1200
committerThomas Munro <tmunro@postgresql.org>2023-07-03 11:22:10 +1200
commitf50200c0163c1dbb5aa015828e8bf32b50a2cd29 (patch)
tree5ae591347b6054e6804a3e6f78057ef6963323ba /src
parent7ae4e786892f45af4ded23c94a26537a4b11a4c7 (diff)
downloadpostgresql-f50200c0163c1dbb5aa015828e8bf32b50a2cd29.tar.gz
postgresql-f50200c0163c1dbb5aa015828e8bf32b50a2cd29.zip
Silence "missing contrecord" error.
Commit dd38ff28ad added a new error message "missing contrecord" when we fail to reassemble a record. Unfortunately that caused noisy messages to be logged by pg_waldump at end of segment, and by walsender when asked to shut down on a segment boundary. Remove the new error message, so that this condition signals end-of- WAL without a message. It's arguably a reportable condition that should not be silenced while performing crash recovery, but fixing that without introducing noise in the other cases will require more research. Back-patch to 15. Reported-by: Tomas Vondra <tomas.vondra@enterprisedb.com> Discussion: https://postgr.es/m/6a1df56e-4656-b3ce-4b7a-a9cb41df8189%40enterprisedb.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xlogreader.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index dc6a8093b3a..03fad82bc1b 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -912,15 +912,11 @@ err:
state->missingContrecPtr = targetPagePtr;
/*
- * If we got here without reporting an error, report one now so that
- * XLogPrefetcherReadRecord() doesn't bring us back a second time and
- * clobber the above state. Otherwise, the existing error takes
- * precedence.
+ * If we got here without reporting an error, make sure an error is
+ * queued so that XLogPrefetcherReadRecord() doesn't bring us back a
+ * second time and clobber the above state.
*/
- if (!state->errormsg_buf[0])
- report_invalid_record(state,
- "missing contrecord at %X/%X",
- LSN_FORMAT_ARGS(RecPtr));
+ state->errormsg_deferred = true;
}
if (decoded && decoded->oversized)