Re: pgsql: Removed unused variable, openLogOff.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Removed unused variable, openLogOff.
Date: 2019-03-07 14:11:16
Message-ID: 20190307141116.GC26628@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-07 14:34:45 pgsql: Fix the BY {REF,VALUE} clause of XMLEXISTS/XMLTABLE
Previous Message Alvaro Herrera 2019-03-07 13:09:46 pgsql: Add missing <limits.h>

Browse pgsql-hackers by date

  From Date Subject
Next Message Sandro Mani 2019-03-07 14:23:50 [Patch] Mingw: Fix import library extension, build actual static libraries
Previous Message Michael Paquier 2019-03-07 13:59:44 Re: few more wait events to add to docs