Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f66T1-00079Y-1x for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Apr 2018 03:30:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f66Sy-0002rc-Vd for pgsql-bugs@arkaria.postgresql.org; Wed, 11 Apr 2018 03:30:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f66Sx-0002o5-4L for pgsql-bugs@lists.postgresql.org; Wed, 11 Apr 2018 03:30:36 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f66St-000323-BA for pgsql-bugs@lists.postgresql.org; Wed, 11 Apr 2018 03:30:33 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A58ED20DEF; Tue, 10 Apr 2018 23:30:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 10 Apr 2018 23:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Ldxc4lYChjOfkhfpIcVvnHddKYxwKN5vgNly+eCNkCQ=; b=lcWucMb0 299pNUFHGvOFCgJf7JSbw0PM5+oBxYMH3KjSSOpKgIeOV26sgt2X6VzscVO4hZTV vBD1oN0S0Y5O9SaVaFsB0SaiGoUGPXpF1dzPxUYdEgcfSTa/kQa4CgTX/vK7aG8u jDpKTTBDNMg1Lt6afNzlsZcghEENX2umg5uTUkhvaASndldYnM398K7iS4iy6VdS fHikMVy/tjQ6qHSwMr9GIrsuoU7Fs1cqHKi8DH3K/JTsuO5FoLyEQgzkGIVuMrJh EIt9VeAG7bKwaIq3or+MYubQX9RryGyZSRgmau2qEoobkj+KeVJfdpXlkOEXnakU imF9XymoIup2uw== 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-sender :x-me-sender:x-sasl-enc; s=fm2; bh=Ldxc4lYChjOfkhfpIcVvnHddKYxwK N5vgNly+eCNkCQ=; b=F/aC8iXSl1fZGOEjYQrIFqsP/M24qyjSSbDaIS3dIgu9m njyNco6US4hXYb4Md28g0ocippS6M0VjOqGSsnsZ5WXtik8qOWrtwgPSbie6SWpA 3/Iq5TQtwHydrfr54j0fjSw3jqMSWuZdi5RRx5yf2SFe0OBhTzHvBBRZYLg5EYvb GzzsHVwq0qzQXQb7Hv2/E1a/W/1/x1rFzFKOn+afKgoX45+n4gs+qd6Ykr1iDmaN 9L9ohmAT2ZxxEYJ513cfC6QHh1GL2GjbK/TuVdteFhsB13PnvU6LnOhhn1J/8U/6 BUUXK6ZSB1eh4zomf7nuVWNwBsByeu06/6eiV0N8w== X-ME-Sender: Received: from paquier.xyz (mp76f1f8fc.ap.nuro.jp [118.241.248.252]) by mail.messagingengine.com (Postfix) with ESMTPA id 85632102AE; Tue, 10 Apr 2018 23:30:27 -0400 (EDT) Date: Wed, 11 Apr 2018 12:30:24 +0900 From: Michael Paquier To: Tom Lane Cc: bianpan2016@163.com, pgsql-bugs@lists.postgresql.org, Robert Haas Subject: Re: BUG #15105: OpenTransientFile() should be paired with CloseTransientFile() rather than close() Message-ID: <20180411032917.GK26769@paquier.xyz> References: <152056616579.4966.583293218357089052@wrigleys.postgresql.org> <20180309044052.GC1416@paquier.xyz> <19686.1520607468@sss.pgh.pa.us> <12895.1523400043@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EVF5PPMfhYS0aIcm" Content-Disposition: inline In-Reply-To: <12895.1523400043@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --EVF5PPMfhYS0aIcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 10, 2018 at 06:40:43PM -0400, Tom Lane wrote: > On closer inspection, such a cross-check wouldn't have helped find this > particular mistake, because it was in an error exit path that's likely > never been exercised by anybody, and certainly isn't hit in the regression > tests. Still, I think it'd be a good thing to add, and hence propose the > attached patch. (I've verified that the warning doesn't fire in "make > check-world".) Good idea. +1 for your proposed patch. -- Michael --EVF5PPMfhYS0aIcm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlrNgU8ACgkQnvQgOdby QH2W4w/+LgNX0/RONHX9nzh8AmuCcNI3JXgg6KLryPE7Cn/Ka4j2Stfq+ayb1gUG qycmV6p/TAWklr5bgObVa2J8wA890L9aJOJ378N0hqOGdwj5HMzBGD0CBKbS+dze VtmS5nXp28nRDKKIUlu3A5bwdodcXurBgu+lk2HIiOSvcAmPkm7FWroLu0Q5SZTp gEH2EW6zrSis6cpEPsQvTvQd0oWipv1bS/sJ28kke784d819rEtgd26k+7mh7Hnm g7RoMmFZ2Vxo3WisBgDHH8mZyueaJqBCSLO/MAvUaYzDaTMxNzjKPbEEtSgrtJSn XpapcO+Gc9ufxrIO3K3W9WJfcMCzwrcvJbMUOjJ5gsQadD4wWbgWkO2OvzqPaZ7N Ino0aKqJqB1Skw0Yx+rNO9E36NwDnqzaOnM0U5euzzqrH37FTbrJcRw61OYukh2x CnVHRZcqv7LPxX9vmo5bE3JdYj9/AqjtnuP7F5z6j5012FnehdZS/PN0cfvBEKVi kR0HlqQXpngr8PGd4OchT6qHkoXsgtnYCteEYJrWk1GOrst11Hw0vFLgo2eUCPy7 vfEvdFjtg0CFyIO0sOU0oFxUCPkmuy7qwcFw+TmGcjog1rmKsr2YK9/gCv+L5kCW FQtyoBqt6H0fgEewT92FIAcQvhEYPaNkLwf5VusCXrIHyhBXhkM= =/nd8 -----END PGP SIGNATURE----- --EVF5PPMfhYS0aIcm--