On Thu, Mar 07, 2019 at 11:11:16PM +0900, Michael Paquier wrote:
> If you want to keep this formulation, that's fine for me.  However you
> should really change it to nleft as you suggest, and not keep nbytes.

After sleeping on it, let's live with just switching to nleft in the
message, without openLogOff as that's the second time folks complain
about the previous code.  So I just propose the attached.  Robert,
others, any objections?  Perhaps you would prefer fixing it yourself?
--
Michael
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 0fdd82a287..9ab0efb0bb 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;

Attachment: signature.asc
Description: PGP signature

Reply via email to