aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/file/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r--src/backend/storage/file/fd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index e3e1ff00e4c..2a6c9466363 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.56 2000/04/12 17:15:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.57 2000/05/31 00:28:27 petere Exp $
*
* NOTES:
*
@@ -196,7 +196,10 @@ static long pg_nofile(void);
int
pg_fsync(int fd)
{
- return disableFsync ? 0 : fsync(fd);
+ if (enableFsync)
+ return fsync(fd);
+ else
+ return 0;
}
/*
@@ -916,7 +919,7 @@ FileSync(File file)
/* Need not sync if file is not dirty. */
returnCode = 0;
}
- else if (disableFsync)
+ else if (!enableFsync)
{
/* Don't force the file open if pg_fsync isn't gonna sync it. */
returnCode = 0;