Content-Length: 258735 | pFad | http://github.com/postgrespro/postgres_cluster/commit/62d02f39e72a2c030711a772f00f47f51262803c

9A Fix race-under-concurrency in PathNameCreateTemporaryDir. · postgrespro/postgres_cluster@62d02f3 · GitHub
Skip to content

Commit 62d02f3

Browse files
committed
Fix race-under-concurrency in PathNameCreateTemporaryDir.
Thomas Munro Discussion: http://postgr.es/m/CAEepm=1Vp1e3KtftLtw4B60ZV9teNeKu6HxoaaBptQMsRWjJbQ@mail.gmail.com
1 parent 7a727c1 commit 62d02f3

File tree

1 file changed

+1
-1
lines changed
  • src/backend/storage/file

1 file changed

+1
-1
lines changed

src/backend/storage/file/fd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ PathNameCreateTemporaryDir(const char *basedir, const char *directory)
14511451
basedir)));
14521452

14531453
/* Try again. */
1454-
if (mkdir(directory, S_IRWXU) < 0)
1454+
if (mkdir(directory, S_IRWXU) < 0 && errno != EEXIST)
14551455
ereport(ERROR,
14561456
(errcode_for_file_access(),
14571457
errmsg("cannot create temporary subdirectory \"%s\": %m",

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/62d02f39e72a2c030711a772f00f47f51262803c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy