Re: BUG #15858: could not stat file - over 4GB

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Emil Iggland <emil@iggland.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-12T15:13:38Z
Lists: pgsql-bugs, pgsql-hackers
=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> On Mon, Oct 12, 2020 at 5:27 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Michael Paquier <michael@paquier.xyz> writes:
>>> Why are we forcing errno=ENOENT here?  Wouldn't it be correct to use
>>> _dosmaperr(GetLastError()) to get the correct errno?

>> Fair question.  Juan, was there some good reason not to look at
>> GetLastError() in this step?

> Uhm, a good question indeed, forcing errno serves no purpose there.

OK, changed.

			regards, tom lane



Commits

  1. Minor cleanup for win32stat.c.

  2. plperl.h should #undef fstat along with stat and lstat.

  3. Fix our Windows stat() emulation to handle file sizes > 4GB.