Skip to content

Commit 262fbcb

Browse files
committed
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.
1 parent 30ba0d0 commit 262fbcb

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

src/backend/storage/file/fd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ pre_sync_fname(char *fname, bool isdir)
20152015
{
20162016
int fd;
20172017

2018-
fd = open(fname, O_RDONLY | PG_BINARY);
2018+
fd = BasicOpenFile(fname, O_RDONLY | PG_BINARY, 0);
20192019

20202020
/*
20212021
* Some OSs don't allow us to open directories at all (Windows returns
@@ -2074,7 +2074,7 @@ walkdir(char *path, void (*action) (char *fname, bool isdir))
20742074
#ifndef WIN32
20752075
else if (S_ISLNK(fst.st_mode))
20762076
#else
2077-
else if (pg_win32_is_junction(subpath))
2077+
else if (pgwin32_is_junction(subpath))
20782078
#endif
20792079
{
20802080
#if defined(HAVE_READLINK) || defined(WIN32)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy