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

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, william allen <williamedwinallen(at)live(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15858: could not stat file - over 4GB
Date: 2020-09-18 10:47:06
Message-ID: CAC+AXB2164H1JjSOPwf=PK5AhRVHSApzC5NAU-443HSu7RotSA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Sep 17, 2020 at 8:47 PM Juan José Santamaría Flecha <
juanjo(dot)santamaria(at)gmail(dot)com> wrote:

> On Thu, Sep 17, 2020 at 6:04 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-09-18 13:52:46 Re: BUG #16623: JSON select query result is getting differed when we change DB version
Previous Message Daniel Gustafsson 2020-09-18 09:38:15 Re: BUG #16622: pg_dump produces erroneus ALTER TABLE statement for a table with an inherited generated column

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2020-09-18 11:02:04 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Amit Khandekar 2020-09-18 10:46:59 Re: Redundant tuple copy in tqueueReceiveSlot()