Re: Possible race condition in pg_mkdir_p()?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ning Yu <nyu(at)pivotal(dot)io>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Paul Guo <pguo(at)pivotal(dot)io>
Subject: Re: Possible race condition in pg_mkdir_p()?
Date: 2019-07-18 08:57:45
Message-ID: 20190718085745.GJ1416@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2019-07-18 09:00:48 Re: Intermittent pg_ctl failures on Windows
Previous Message Michael Paquier 2019-07-18 08:51:48 Re: Intermittent pg_ctl failures on Windows