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: Thu, 7 Mar 2019 23:11:16 +0900
Message-ID: <20190307141116.GC26628@paquier.xyz> (raw)
In-Reply-To: <CA+Tgmoaj-6K1yE0vgpOr60dVx0ES0+hQy6874tDi4bLkBKmbFg@mail.gmail.com>
References: <E1h1XpE-0007D7-Ol@gemulon.postgresql.org>
<20190306235251.GA17293@paquier.xyz>
<CA+Tgmoaj-6K1yE0vgpOr60dVx0ES0+hQy6874tDi4bLkBKmbFg@mail.gmail.com>
On Thu, Mar 07, 2019 at 08:03:19AM -0500, Robert Haas wrote:
> Oh, sorry, I didn't see the earlier thread. You're right that this is
> messed up: if we're going to report startOffset rather than
> openLogOff, we need to report nleft rather than bytes. I would prefer
> to change nbytes -> nleft rather than anything else, though, because
> it seems to me that we should report the offset and length that
> actually failed, not the start of the whole chunk which partially
> succeeded.
I found the original coding cleaner logically (perhaps a matter of
personal taste and I am quite used to it so I am under influence!) by
reporting at which position it has failed when writing a given chunk.
Now it is the second time that somebody is sending a patch for that in
a couple of weeks, so visibly people obviously would like to simplify
this code :)
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.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pgsql: Removed unused variable, openLogOff.
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>
* 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