aboutsummaryrefslogtreecommitdiff
path: root/src/port/open.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-03-24 04:37:07 +0000
committerBruce Momjian <bruce@momjian.us>2005-03-24 04:37:07 +0000
commit291cd954fbfa48d8db79f22ffa8d596c837f7ee3 (patch)
treec5ee727969ee7d110179eddee8a963fcfe313a4c /src/port/open.c
parent3781b72c22f766b390d29c4b9c6adbdc6997c774 (diff)
downloadpostgresql-291cd954fbfa48d8db79f22ffa8d596c837f7ee3.tar.gz
postgresql-291cd954fbfa48d8db79f22ffa8d596c837f7ee3.zip
Change Win32 O_SYNC method to O_DSYNC because that is what the method
currently does. This is now the default Win32 wal sync method because we perfer o_datasync to fsync. Also, change Win32 fsync to a new wal sync method called fsync_writethrough because that is the behavior of _commit, which is what is used for fsync on Win32. Backpatch to 8.0.X.
Diffstat (limited to 'src/port/open.c')
-rw-r--r--src/port/open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/port/open.c b/src/port/open.c
index 3ff6b0e2dda..fcf35ce2604 100644
--- a/src/port/open.c
+++ b/src/port/open.c
@@ -6,7 +6,7 @@
*
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/port/open.c,v 1.7.4.1 2005/03/17 17:28:59 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/open.c,v 1.7.4.2 2005/03/24 04:37:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,7 +63,7 @@ win32_open(const char *fileName, int fileFlags,...)
/* Check that we can handle the request */
assert((fileFlags & ((O_RDONLY | O_WRONLY | O_RDWR) | O_APPEND |
(O_RANDOM | O_SEQUENTIAL | O_TEMPORARY) |
- _O_SHORT_LIVED | O_SYNC |
+ _O_SHORT_LIVED | O_DSYNC |
(O_CREAT | O_TRUNC | O_EXCL) | (O_TEXT | O_BINARY))) == fileFlags);
sa.nLength = sizeof(sa);
@@ -83,7 +83,7 @@ win32_open(const char *fileName, int fileFlags,...)
((fileFlags & O_SEQUENTIAL) ? FILE_FLAG_SEQUENTIAL_SCAN : 0) |
((fileFlags & _O_SHORT_LIVED) ? FILE_ATTRIBUTE_TEMPORARY : 0) |
((fileFlags & O_TEMPORARY) ? FILE_FLAG_DELETE_ON_CLOSE : 0)|
- ((fileFlags & O_SYNC) ? FILE_FLAG_WRITE_THROUGH : 0),
+ ((fileFlags & O_DSYNC) ? FILE_FLAG_WRITE_THROUGH : 0),
NULL)) == INVALID_HANDLE_VALUE)
{
switch (GetLastError())