Re: BUG #15858: could not stat file - over 4GB - Mailing list pgsql-hackers

From Juan José Santamaría Flecha
Subject Re: BUG #15858: could not stat file - over 4GB
Date
Msg-id CAC+AXB2164H1JjSOPwf=PK5AhRVHSApzC5NAU-443HSu7RotSA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15858: could not stat file - over 4GB  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Responses Re: BUG #15858: could not stat file - over 4GB  (Emil Iggland <emil@iggland.com>)
List pgsql-hackers

On Thu, Sep 17, 2020 at 8:47 PM Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> wrote:
On Thu, Sep 17, 2020 at 6:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:

One thing I noticed, which is a pre-existing problem but maybe now
is a good time to consider it, is that we're mapping lstat() to be
exactly stat() on Windows.  That made sense years ago when (we
believed that) Windows didn't have symlinks, but surely it no longer
makes sense.

I will have to take a better look at it, but from a quick look it, all lstat() calls seem to test just if the file exists, and that can be done with a cheap call to GetFileAttributes(). Would a limited (but fast) lstat(), where only st_mode could be informed, be acceptable?

After thinking more about this, that approach would be problematic for DELETE_PENDING files. The proposed patch logic is meant to maintain current behaviour, which is not broken for WIN32 symlinks AFAICT.

Regards,

Juan José Santamaría Flecha

pgsql-hackers by date:

Previous
From: Amit Khandekar
Date:
Subject: Re: Redundant tuple copy in tqueueReceiveSlot()
Next
From: Dmitry Dolgov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting