Re: Possible race condition in pg_mkdir_p()? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Possible race condition in pg_mkdir_p()?
Date
Msg-id 20190718085745.GJ1416@paquier.xyz
Whole thread Raw
In response to Possible race condition in pg_mkdir_p()?  (Ning Yu <nyu@pivotal.io>)
Responses Re: Possible race condition in pg_mkdir_p()?  (Paul Guo <pguo@pivotal.io>)
Re: Possible race condition in pg_mkdir_p()?  (Ning Yu <nyu@pivotal.io>)
List pgsql-hackers
On Thu, Jul 18, 2019 at 04:17:22PM +0800, Ning Yu wrote:
> This is still wrong with current code logic, because when the statusdir is
> a file the errno is also EEXIST, but it can pass the check here.  Even if
> we fix pg_mkdir_p() by following the `mkdir -p` way the errno check here is
> still wrong.

Would you like to send a patch?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Intermittent pg_ctl failures on Windows
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Intermittent pg_ctl failures on Windows