Re: Intermittent pg_ctl failures on Windows - Mailing list pgsql-hackers

From Жарков Роман
Subject Re: Intermittent pg_ctl failures on Windows
Date
Msg-id ECD07611-BBA8-4E9B-975C-50E59F7154DA@postgrespro.ru
Whole thread Raw
In response to Re: Intermittent pg_ctl failures on Windows  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Intermittent pg_ctl failures on Windows  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
Hello,

Therefore, we suggest replace the deletion of a lock file by renaming it.
unlink in windows is not an atomic operation.
When we try to open the file between
SetDispositionInformationFile and CloseFile we get ERROR_DELETE_PENDING ( see screenshot )


regards, Roman

> 18 июля 2019 г., в 12:38, Michael Paquier <michael@paquier.xyz>
>
> Oh, it is.  A lot.  And this has been discussed a couple of times
> across multiple threads on -bugs and/or -hackers.  I think that
> Windows just lacks a way to detect reliably if a file is pending for
> deletion or not, and there is no way that we are going to enforce
> blindly a ERROR_DELETE_PENDING when we see EACCES.  One code path
> which is impacted by that is our wrapper for stat() for the win32
> port...  For now I'd rather believe that what the OS tells us is true,
> in which case here it is plain wrong, but well.
> --
> Michael

Attachment

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join
Next
From: David Rowley
Date:
Subject: Re: Performance issue in foreign-key-aware join estimation