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 1gzshk-00012u-Bs for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Mar 2019 00:40:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gzshj-0001NP-09 for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Mar 2019 00:40:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzshg-0001J8-Pi for pgsql-hackers@lists.postgresql.org; Sat, 02 Mar 2019 00:40:38 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gzshd-0000Am-F3 for pgsql-hackers@lists.postgresql.org; Sat, 02 Mar 2019 00:40:35 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E6F4421B82; Fri, 1 Mar 2019 19:40:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 01 Mar 2019 19:40:31 -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=ZmYLuabpW3Xk86A2rm1yiHrwzI1 JjT/uPcdmyrEH154=; b=nmE/o96QsmREEoqKEYXhU5Ju1UT4sHnVw2Djro1GuMk +bER0ZX4QxRUHOwtly9fUTz0RBGnR4jS/9x3j3nxinRJUZq+cEcSr5NtFxCE/O5t vF63EF4iYTblY77xWimk9FBBGQ7kOA9F1ivxUqJpCEirj5VT6GH9aBmfol/RXR0+ 3dzy9RTcXDljKBK284VJhVlxx5rVGrLTmH35wPeBNoUohZGcQdickwIBCu4fR4iV Zz+Cz/AYoSowXd2CPus1keLDGLC8Ed1tU5fH1bnDumYT/SE72FdoqV0QlIOjA+Gh BhjxU9ZnPzE4eBXlHrn5SnEzaIfSGZsHUYUj62a5X9A== 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=ZmYLua bpW3Xk86A2rm1yiHrwzI1JjT/uPcdmyrEH154=; b=RhDwZTnDDi+MvT3JH8hHfr 7+uwsLacb3lvfQ6GctnZCMts8g5xNpsmW4WSm57Py3OD8dL3y3EwojDtkDNhJdu0 QHdPf0chZUirGrhmH7Dq6mqd23Qhli94npePNA+72TOzbqAAmlcAN6ZS59yDgNCU uHjjLw1QTs/IvNHkjgfVZRhNcUmfCWBPn0juLcAY2/GOGuQ74gX5rQa/H/ymDQfc +GPiWI8UiKv9xkv61JMDUxlxNLe9SR4JO7coAqlVbRYuF6OCQEhJob/QKOyQxV/2 vjp6f6di8ifHAKMUs+mhyFAqZE5Z5/+47UHC4u+XtA95Fza16YfDc1DNLsTv4m9w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrvdeigddvfecutefuodetggdotefrodftvf 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 24D1CE427E; Fri, 1 Mar 2019 19:40:29 -0500 (EST) Date: Sat, 2 Mar 2019 09:40:22 +0900 From: Michael Paquier To: Joe Conway Cc: Postgres hackers Subject: Re: Tighten error control for OpenTransientFile/CloseTransientFile Message-ID: <20190302004022.GA1602@paquier.xyz> References: <20190301023338.GD1348@paquier.xyz> <09ffc3a3-0e1d-91c6-7748-890b1829469a@joeconway.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/9DWx/yDrRhgMJTb" Content-Disposition: inline In-Reply-To: <09ffc3a3-0e1d-91c6-7748-890b1829469a@joeconway.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --/9DWx/yDrRhgMJTb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 01, 2019 at 05:05:54PM -0500, Joe Conway wrote: > Seems like it would be better to modify the arguments to > CloseTransientFile() to include the filename being closed, errorlevel, > and fail_on_error or something similar. Then all the repeated ereport > stanzas could be eliminated. Sure. Now some code paths close file descriptors without having at hand the file name, which would mean that we'd need to pass NULL as argument in this case. That's not really elegant in my opinion. And having a consistent mapping with the system's close() is not really bad to me either.. -- Michael --/9DWx/yDrRhgMJTb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlx50PYACgkQnvQgOdby QH10Pg//VzYmqAFa6G9cxj/h9SMigi0hVFfZa4G5P/zvCD4gIckTIqbn+TrDOdzl fYmHJ4VbtpBPCqmWNCKDk2XTOlrB5ViRW/yBiIBY9A9hCWOokJfTvcmfWlkQTdzc 4FjmseAnBM6AWydZKAI+cJid+dBX7ZjYUxgT+YE6L+oh2opRz49kPE+nhk2dXFKk qiJNh5C7UEpCUTgIbNWm+UEywuaxiWBfWllkIWopr7V8Yex6pxzB16lmy1iD36+y E5lt6SaMy/maXSnmT7EfQXRaiM6YF5kkvN14fMLfBj+yHKXrZVNz01L3nooWKJ5X LFkgjmGIcrQZJqMCzbE2f0X7RvW+vbc3aIN4uZPhC1arZ01b+lBv4W7Qc5TMIxdy H3x+mjkGWvx7txAxZVQ2SAauzDtzvV+FLryvMHZcst5kHHxbfukZ7Gbk/PlaIT9M eLhaSX9vAQzk5FkdjDseoCphDKnsSGwmlnRzM3uVVVJa4OWhxE7mcNIO5bXe/2xq Jq4BSlSz1XeV1kouBnZViewY9fwu01+zxZV2ZPjTiJTTq4Gd5hwt+eISjwBNjcHS baT9I4zln48PK1GjbCOjHfPS5aBq/zb8t6Ntr/9YGXlwLkx4VfSG8whv4A7k5by1 8jajn9jw9gCn7lXjftP6gq6YPFSJc5rNZaKTGqKl/9CLqt+wEuI= =DFGn -----END PGP SIGNATURE----- --/9DWx/yDrRhgMJTb--