Re: Pinned files at Windows - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Pinned files at Windows
Date
Msg-id 20190604001821.GB1529@paquier.xyz
Whole thread Raw
In response to Re: Pinned files at Windows  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Pinned files at Windows
List pgsql-hackers
On Mon, Jun 03, 2019 at 11:37:30PM +0300, Konstantin Knizhnik wrote:
> but without success because ERROR_DELETE_PENDING is never returned by Win32.
> And moreover, stat() doesn't ever return error in this case.

Could it be possible to find a reliable way to detect that?
Cloberring errno with an incorrect value is not something we can rely
on, and I am ready to buy that GetFileAttributesEx() can also return
EACCES for some legit cases, like a file it has no access to.  What
if for example something is done on a file between the stat() call and
the GetFileAttributesEx() call in pgwin32_safestat() so as EACCES is
a legit error?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Ashwin Agrawal
Date:
Subject: Re: Confusing error message for REINDEX TABLE CONCURRENTLY
Next
From: Ashwin Agrawal
Date:
Subject: Re: Comment typo in tableam.h