Content-Length: 272215 | pFad | http://github.com/postgrespro/postgres/commit/6ee1a7738ad04a1e6e481c81149770b2e565c0c1

BA Fix some problems with patch to fsync the data directory. · postgrespro/postgres@6ee1a77 · GitHub
Skip to content

Commit 6ee1a77

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 4b71d28 commit 6ee1a77

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
@@ -2217,7 +2217,7 @@ pre_sync_fname(char *fname, bool isdir)
22172217
{
22182218
int fd;
22192219

2220-
fd = open(fname, O_RDONLY | PG_BINARY);
2220+
fd = BasicOpenFile(fname, O_RDONLY | PG_BINARY, 0);
22212221

22222222
/*
22232223
* 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))
22762276
#ifndef WIN32
22772277
else if (S_ISLNK(fst.st_mode))
22782278
#else
2279-
else if (pg_win32_is_junction(subpath))
2279+
else if (pgwin32_is_junction(subpath))
22802280
#endif
22812281
{
22822282
#if defined(HAVE_READLINK) || defined(WIN32)

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/commit/6ee1a7738ad04a1e6e481c81149770b2e565c0c1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy