Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRIti-0005g2-JS for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Oct 2020 17:43:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kRIth-0002xi-Ft for pgsql-hackers@arkaria.postgresql.org; Sat, 10 Oct 2020 17:43:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRIth-0002xb-9E for pgsql-hackers@lists.postgresql.org; Sat, 10 Oct 2020 17:43:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRItf-00042H-5G for pgsql-hackers@lists.postgresql.org; Sat, 10 Oct 2020 17:43:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09AHgwdF2920042; Sat, 10 Oct 2020 13:42:58 -0400 From: Tom Lane To: =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= cc: Michael Paquier , Emil Iggland , PostgreSQL Hackers Subject: Re: BUG #15858: could not stat file - over 4GB In-reply-to: References: <15858-9572469fd3b73263@postgresql.org> <160209800917.1171.12856112208955258625.pgcf@coridan.postgresql.org> <2831747.1602274940@sss.pgh.pa.us> <20201010122353.GA2985@paquier.xyz> Comments: In-reply-to =?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= message dated "Sat, 10 Oct 2020 16:29:38 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2920040.1602351778.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 10 Oct 2020 13:42:58 -0400 Message-ID: <2920041.1602351778@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?UTF-8?Q?Juan_Jos=3DC3=3DA9_Santamar=3DC3=3DADa_Flecha?=3D writes: > If the file does not exist there is no need to call _dosmaperr() and log > the error. I concur with Michael that it's inappropriate to make an end run around _dosmaperr() here. If you think that the DEBUG5 logging inside that is inappropriate, you should propose removing it outright. Pushed the rest of this. (pgindent behaved differently around PFN_NTQUERYINFORMATIONFILE today than it did yesterday. No idea why.) > The meaningful error should come from the previous call, and an error fr= om > CloseHandle() could mask it. Not sure it makes a difference anyhow. Would CloseHandle() really touch errno at all? But this way is certainly safer, so done. regards, tom lane