Re: fix pg_mkdir_p to tolerate concurrent directory creation

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-18T15:43:38Z
Lists: pgsql-hackers
Andrew Dunstan <andrew@dunslane.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?)

			regards, tom lane



Commits

  1. Make pg_mkdir_p() tolerant of a concurrent directory creation.