summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGreg Stark <stark@mit.edu>2010-02-17 11:35:51 +0000
committerGreg Stark <stark@mit.edu>2010-02-17 11:35:51 +0000
commitd7869160156df64fc381a763b4a30c865f947ece (patch)
treed7740605317f1776a74ad158bfa9059b365f98a4 /src
parent7f92f7cf711833db77b2d8214c60190cbfeebf1e (diff)
revert prior patch to fsync directories until portability problems exposed by build farm can be sorted out
Diffstat (limited to 'src')
-rw-r--r--src/port/copydir.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/port/copydir.c b/src/port/copydir.c
index bd252691812..067f2bc9103 100644
--- a/src/port/copydir.c
+++ b/src/port/copydir.c
@@ -11,7 +11,7 @@
* as a service.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/copydir.c,v 1.16.2.2 2010/02/14 17:50:34 stark Exp $
+ * $PostgreSQL: pgsql/src/port/copydir.c,v 1.16.2.3 2010/02/17 11:35:51 stark Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,7 +50,6 @@ copydir(char *fromdir, char *todir, bool recurse)
{
DIR *xldir;
struct dirent *xlde;
- int dirfd;
char fromfile[MAXPGPATH];
char tofile[MAXPGPATH];
@@ -92,26 +91,6 @@ copydir(char *fromdir, char *todir, bool recurse)
}
FreeDir(xldir);
-
- /*
- * fsync the directory to make sure not just the data but also the
- * new directory file entries have reached the disk. While needed
- * by most filesystems, the window got bigger with newer ones like
- * ext4.
- */
- dirfd = BasicOpenFile(todir,
- O_RDONLY | PG_BINARY,
- S_IRUSR | S_IWUSR);
- if(dirfd == -1)
- ereport(ERROR,
- (errcode_for_file_access(),
- errmsg("could not open directory for fsync \"%s\": %m", todir)));
-
- if(pg_fsync(dirfd) == -1)
- ereport(ERROR,
- (errcode_for_file_access(),
- errmsg("could not fsync directory \"%s\": %m", todir)));
- close(dirfd);
}
/*