Re: fix pg_mkdir_p to tolerate concurrent directory creation

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: fix pg_mkdir_p to tolerate concurrent directory creation
Date: 2026-06-18 16:56:25
Message-ID: a306488f-16d4-49e1-a872-bc3ffc83d50b@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-06-18 Th 11:43 AM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> Oh, good catch, thanks! Here's a revised patch.
> The Unix side of this LGTM. I have no idea about the Windows
> half (... but are we sure GetFileAttributes() can't change errno?)
>
>

I'm told it does not. Google says:

GetFileAttributes does not set errno. Because it is a Win32 API function
rather than a standard C library function, it sets the thread-local
Last-Error Code instead.

|
|

|cheers|

|
|

|andrew|

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeyaprakash Rajamani 2026-06-18 17:15:48 Re: Performance Degradation (Table becomes bloat) During Repeated Bulk UPDATE Operations
Previous Message Tristan Partin 2026-06-18 16:54:36 Re: Add pg_stat_kind_info system view