aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/file_utils.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2016-09-29 12:00:00 -0400
committerPeter Eisentraut <peter_e@gmx.net>2016-09-29 12:00:00 -0400
commitbf5bb2e85b6492c7245b9446efaf43d52a98db13 (patch)
tree38f78d92b70e4823373d39053cef9fd2be562a1b /src/include/common/file_utils.h
parent6e654546fb61f62cc982d0c8f62241b3b30e7ef8 (diff)
downloadpostgresql-bf5bb2e85b6492c7245b9446efaf43d52a98db13.tar.gz
postgresql-bf5bb2e85b6492c7245b9446efaf43d52a98db13.zip
Move fsync routines of initdb into src/common/
The intention is to used those in other utilities such as pg_basebackup and pg_receivexlog. From: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/include/common/file_utils.h')
-rw-r--r--src/include/common/file_utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
new file mode 100644
index 00000000000..d3794df7a0c
--- /dev/null
+++ b/src/include/common/file_utils.h
@@ -0,0 +1,22 @@
+/*-------------------------------------------------------------------------
+ *
+ * File-processing utility routines for frontend code
+ *
+ * Assorted utility functions to work on files.
+ *
+ *
+ * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/common/file_utils.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef FILE_UTILS_H
+#define FILE_UTILS_H
+
+extern void fsync_fname(const char *fname, bool isdir,
+ const char *progname);
+extern void fsync_pgdata(const char *pg_data, const char *progname);
+
+#endif /* FILE_UTILS_H */