Skip to content

Commit f43e295

Browse files
committed
Report expected contrecord length on mismatch
When reading a WAL record fails to find continuation record(s) of the proper length, report what it expects, for clarity. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/20200903212152.GA15319@alvherre.pgsql
1 parent 38a2d70 commit f43e295

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/access/transam/xlogreader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,9 @@ XLogReadRecord(XLogReaderState *state, char **errormsg)
464464
total_len != (pageHeader->xlp_rem_len + gotlen))
465465
{
466466
report_invalid_record(state,
467-
"invalid contrecord length %u at %X/%X",
467+
"invalid contrecord length %u (expected %lld) at %X/%X",
468468
pageHeader->xlp_rem_len,
469+
((long long) total_len) - gotlen,
469470
(uint32) (RecPtr >> 32), (uint32) RecPtr);
470471
goto err;
471472
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy