diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-03-11 09:31:25 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-03-11 09:31:25 +0900 |
commit | f2d84a4a6b4ec891a0a52f583ed5aa081c71acc6 (patch) | |
tree | 10650b24f8fa06c35adeb16b9bfb6afecff23d42 /src/backend/access/transam/xlog.c | |
parent | fc84c05acd151cb1141c47d4af0c5ca803a4c3b4 (diff) | |
download | postgresql-f2d84a4a6b4ec891a0a52f583ed5aa081c71acc6.tar.gz postgresql-f2d84a4a6b4ec891a0a52f583ed5aa081c71acc6.zip |
Adjust error message for partial writes in WAL segments
93473c6 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
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c7047738b67..676d518b1ab 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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; |