pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Removed unused variable, openLogOff.
Date: Fri, 8 Mar 2019 10:27:52 +0900
Message-ID: <20190308012752.GC4099@paquier.xyz> (raw)
In-Reply-To: <20190307141116.GC26628@paquier.xyz>
References: <E1h1XpE-0007D7-Ol@gemulon.postgresql.org>
	<20190306235251.GA17293@paquier.xyz>
	<CA+Tgmoaj-6K1yE0vgpOr60dVx0ES0+hQy6874tDi4bLkBKmbFg@mail.gmail.com>
	<20190307141116.GC26628@paquier.xyz>

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

Attachments:

xlog-nbytes-fix.patch (text/x-diff, 534B) download 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;
signature.asc (application/pgp-signature, 832B) download

view thread (9+ messages)  latest in thread

Message-ID: <20190308012752.GC4099@paquier.xyz>
Permalink:  ../20190308012752.GC4099@paquier.xyz/
Also on:    postgresql.org/message-id/20190308012752.GC4099@paquier.xyz

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: michael@paquier.xyz, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Removed unused variable, openLogOff.
  In-Reply-To: <20190308012752.GC4099@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox