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 20190731053139.GN1577@paquier.xyz
Whole thread Raw
In response to Re: Possible race condition in pg_mkdir_p()?  (Andres Freund <andres@anarazel.de>)
Responses Re: Possible race condition in pg_mkdir_p()?  (Ning Yu <nyu@pivotal.io>)
List pgsql-hackers
On Tue, Jul 30, 2019 at 10:19:45PM -0700, Andres Freund wrote:
> I don't really have a problem fixing this case if we think it's
> useful. But I'm a bit bothered by all the "fixes" being submitted that
> don't matter for PG itself. They do eat up resources.

Sure.  In this particular case, we can simplify at least one code path
in the backend though for temporary path creation.  Such cleanup rings
like a sufficient argument to me.

> And sorry, adding in-backend threading to test testing mkdir_p doesn't
> make me inclined to believe that this is all well considered.  There's
> minor issues like us not supporting threads in the backend, pthread not
> being portable, and also it being entirely out of proportion to the
> issue.

Agreed on this one.  The test case may be useful for the purpose of
testing the presented patches, but it does not have enough value to be
merged.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Possible race condition in pg_mkdir_p()?
Next
From: vignesh C
Date:
Subject: Re: Unused struct member in pgcrypto pgp.c