Re: Possible race condition in pg_mkdir_p()?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Ning Yu <nyu(at)pivotal(dot)io>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Paul Guo <pguo(at)pivotal(dot)io>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Possible race condition in pg_mkdir_p()?
Date: 2019-07-31 05:31:39
Message-ID: 20190731053139.GN1577@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2019-07-31 05:38:11 Re: Unused struct member in pgcrypto pgp.c
Previous Message Andres Freund 2019-07-31 05:19:45 Re: Possible race condition in pg_mkdir_p()?