diff options
author | Robert Haas <rhaas@postgresql.org> | 2015-05-05 08:30:28 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2015-05-05 09:25:51 -0400 |
commit | 6ee1a7738ad04a1e6e481c81149770b2e565c0c1 (patch) | |
tree | 56bf6ff3e4114d62c99968b765d0f05c92b3bb42 | |
parent | 4b71d28d586fa9af55713a0652614e64027789a7 (diff) | |
download | postgresql-6ee1a7738ad04a1e6e481c81149770b2e565c0c1.tar.gz postgresql-6ee1a7738ad04a1e6e481c81149770b2e565c0c1.zip |
Fix some problems with patch to fsync the data directory.
pg_win32_is_junction() was a typo for pgwin32_is_junction(). open()
was used not only in a two-argument form, which breaks on Windows,
but also where BasicOpenFile() should have been used.
Per reports from Andrew Dunstan and David Rowley.
-rw-r--r-- | src/backend/storage/file/fd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 3c001cbc0a8..5ef6b5a6806 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -2217,7 +2217,7 @@ pre_sync_fname(char *fname, bool isdir) { int fd; - fd = open(fname, O_RDONLY | PG_BINARY); + fd = BasicOpenFile(fname, O_RDONLY | PG_BINARY, 0); /* * Some OSs don't allow us to open directories at all (Windows returns @@ -2276,7 +2276,7 @@ walkdir(char *path, void (*action) (char *fname, bool isdir)) #ifndef WIN32 else if (S_ISLNK(fst.st_mode)) #else - else if (pg_win32_is_junction(subpath)) + else if (pgwin32_is_junction(subpath)) #endif { #if defined(HAVE_READLINK) || defined(WIN32) |