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
This commit is contained in:
parent
38a2d70329
commit
f43e295f68
@ -464,8 +464,9 @@ XLogReadRecord(XLogReaderState *state, char **errormsg)
|
|||||||
total_len != (pageHeader->xlp_rem_len + gotlen))
|
total_len != (pageHeader->xlp_rem_len + gotlen))
|
||||||
{
|
{
|
||||||
report_invalid_record(state,
|
report_invalid_record(state,
|
||||||
"invalid contrecord length %u at %X/%X",
|
"invalid contrecord length %u (expected %lld) at %X/%X",
|
||||||
pageHeader->xlp_rem_len,
|
pageHeader->xlp_rem_len,
|
||||||
|
((long long) total_len) - gotlen,
|
||||||
(uint32) (RecPtr >> 32), (uint32) RecPtr);
|
(uint32) (RecPtr >> 32), (uint32) RecPtr);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user