1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Resurrect -F switch: it controls fsyncs again, though the fsyncs are

mostly just on the WAL logfile nowadays.  But if people want to disable
fsync for performance, why should we say no?
This commit is contained in:
Tom Lane
2000-12-08 22:21:33 +00:00
parent 57c499a463
commit fb47385fc8
3 changed files with 24 additions and 13 deletions

View File

@ -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.68 2000/11/30 08:46:23 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.69 2000/12/08 22:21:32 tgl Exp $
*
* NOTES:
*
@ -192,6 +192,18 @@ static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
static char *filepath(char *filename);
static long pg_nofile(void);
/*
* pg_fsync --- same as fsync except does nothing if -F switch was given
*/
int
pg_fsync(int fd)
{
if (enableFsync)
return fsync(fd);
else
return 0;
}
/*
* BasicOpenFile --- same as open(2) except can free other FDs if needed
*