Content-Length: 263119 | pFad | http://github.com/postgrespro/postgres/commit/f43e295f68c3e04ef891627f62016a5b3d8ed4a8

74 Report expected contrecord length on mismatch · postgrespro/postgres@f43e295 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f43e295f68c3e04ef891627f62016a5b3d8ed4a8

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy