Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 26cbccd

Browse files
committed
Add fsync() define for Win32 to cover cases other than wal_sync_method
where we need fsync().
1 parent e046b3d commit 26cbccd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/include/port/win32.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.45 2005/05/20 14:53:26 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.46 2005/06/16 17:53:54 momjian Exp $ */
22

33
/* undefine and redefine after #include */
44
#undef mkdir
@@ -19,6 +19,11 @@
1919
#define HAVE_FSYNC_WRITETHROUGH
2020
#define HAVE_FSYNC_WRITETHROUGH_ONLY
2121
#define ftruncate(a,b) chsize(a,b)
22+
/*
23+
* Even though we don't support 'fsync' as a wal_sync_method,
24+
* we do fsync() a few other places where _commit() is just fine.
25+
*/
26+
#define fsync(fd) _commit(fd)
2227

2328
#define USES_WINSOCK
2429

0 commit comments

Comments
 (0)