Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1tkT-00006T-Sy for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 14:11:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h1tkQ-0000Kd-Oc for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Mar 2019 14:11:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1tkQ-0000KW-H3 for pgsql-hackers@lists.postgresql.org; Thu, 07 Mar 2019 14:11:46 +0000 Received: from [66.111.4.26] (helo=out2-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h1tkN-0007xW-Te for pgsql-hackers@lists.postgresql.org; Thu, 07 Mar 2019 14:11:46 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 92B4A21FB6; Thu, 7 Mar 2019 09:11:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 07 Mar 2019 09:11:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=/h2D+vCdDKp18bSQ8ztVKlImN1F I4zoWGlD4EhDXJno=; b=J4wJzlmPqwSsyUGkexRn9+zvabruwC5FGbMuZlXDCs/ EsIbxWKpYx1/wzRxMo08WaMdkoPvxbaPgmlSPJpZ3gbz+XljSSAf49F7QkQ1acrw hmDq9IA7tN/Lh1REhXmMrHW6uBjAai7fvssujgws2rbsVUkQA+aWbB2y3HWCkQDX oN6LHXdya9nwPrjsf2nwpFpy/+J6exiQFDOvykf0UIPM/h3KAZiFaydxX27QLy93 1JO07hhHQb2GINI+cPPzTjG7yxNVO+dUYN4TyQDudq9zfdMdnF2JsKj8J5WVkfSn 4sy3Sh7mDyewWBqJ7ojNhzujVJMNme3ORDxO5jwP+qg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/h2D+v CdDKp18bSQ8ztVKlImN1FI4zoWGlD4EhDXJno=; b=waOJGaOAqn30jg/VE8ftcH zjcLreHVGMsOfVabiEUSRPoO5aH+rp+WfYA9eR5ekG1Ksr4L/N4cYWYegDaETeab srEu9WQ82oIQ54FAcR2aCog1/Qm/7YcsWrYYPg4h7gctC7Ccmzsrv0JhUPXrBKRP wiDGD/Jk6Ebz45KgM0bpLJa2JkZncM6kLui9MewVi2+iy352ZgWqV8BlL6h7zt2B 7Dwrf2OCsZI/vjWZNo0OMe9rGpbNB/8vdqHyXTTUqF212MzKiS+/UpItZVqHaMIT 1VhP6WczW8/aufnHG66iXafy3BzusRLrp83Nt04Plws82YYfS4zXUF5o6lBceu+w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrfeekgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghm pehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 48956100E5; Thu, 7 Mar 2019 09:11:19 -0500 (EST) Date: Thu, 7 Mar 2019 23:11:16 +0900 From: Michael Paquier To: Robert Haas Cc: Postgres hackers Subject: Re: pgsql: Removed unused variable, openLogOff. Message-ID: <20190307141116.GC26628@paquier.xyz> References: <20190306235251.GA17293@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Xm/fll+QQv+hsKip" Content-Disposition: inline In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.26 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Xm/fll+QQv+hsKip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --Xm/fll+QQv+hsKip Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlyBJoQACgkQnvQgOdby QH2IYg//T0120zsW4T4XmfEs/j1/3Ifmge+5azSH4c/3eMtIhHa50DxeWwtUmeao JYQ4agXfoCcQ4dJ5uuZ+75rK5ueJ2ty4mcP5dTNCeJm4qxrCJQUSkX5rqw2c0Kbp nus8zg+j+BgzVtJjGpP7PA5k9PcUXP1VNMUcpDB+G5Md/z5aJDbv2nrUOWfDj6M0 UNaVXwho/78EtAOUY4kiiqjB83GfsWBTtbTawZ3WpOgysNhwJfzLOJ7pthGxGWLb 304DJh9yjUPJkT6A09sR6x45IfVbAscGwcRwkH5PoYn1cI/xNRoe0ZdOIGwYasz+ IXrxQ1HmbsLTbTEJTy4yHASN+4Mt4bGYwxLFz2ACvdfuN9NlqDNdMmwVqt9fsgYA oaf8TmfndNUvCZUbgXcy78nHIR+LBvemyIplO0aA3hgva+r20jbNu89U8V/FyetQ miXhBN+WI+O4zps3Vf2JXmxhjFj+UJKs1eP+00f6ucCnQtwXaDzWaEn+XIgWubJ1 YM7g81tA5fsVUQ9ScbkvfRpLxs6eJNR/obymLXqNZ20I2eSWpGHigvyiWlekDJz8 LkGvohoo2aP5DpHGTAFCfKc3F4apalY7hbv6tzBiLYYwLHuvggitWAV+jJCmKaYp bzMgWWoZbHHJ4CpjPXKyIYH6ApsSu4aKqZ0MQqsm2I89kQgWnYE= =CB1U -----END PGP SIGNATURE----- --Xm/fll+QQv+hsKip--