Commit f2d84a4a authored by Michael Paquier's avatar Michael Paquier

Adjust error message for partial writes in WAL segments

93473c6a has removed openLogOff, changing on the way the error message
which is used to report partial writes to WAL segments.  The
newly-introduced error message used the offset up to which the write has
happened, keeping always the same total length to write.  This changes
the error message so as the number of bytes left to write are reported.

Reported-by: Michael Paquier
Author: Robert Haas
Discussion: https://postgr.es/m/20190306235251.GA17293@paquier.xyz
parent fc84c05a
......@@ -2504,7 +2504,7 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible)
errmsg("could not write to log file %s "
"at offset %u, length %zu: %m",
XLogFileNameP(ThisTimeLineID, openLogSegNo),
startoffset, nbytes)));
startoffset, nleft)));
}
nleft -= written;
from += written;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment