diff options
| author | Fujii Masao | 2020-01-24 11:42:52 +0000 |
|---|---|---|
| committer | Fujii Masao | 2020-01-24 11:42:52 +0000 |
| commit | d694e0bb793ebd6b392e6ef6a3b0a59ae66cbc95 (patch) | |
| tree | e53f68bd8ce500aada11ebd776735d139b572618 /src/include | |
| parent | cc25464763f0211e59a209eb50a7b7a79449051f (diff) | |
Add pg_file_sync() to adminpack extension.
This function allows us to fsync the specified file or directory.
It's useful, for example, when we want to sync the file that
pg_file_write() writes out or that COPY TO exports the data into,
for durability.
Author: Fujii Masao
Reviewed-By: Julien Rouhaud, Arthur Zakirov, Michael Paquier, Atsushi Torikoshi
Discussion: https://www.postgresql.org/message-id/CAHGQGwGY8uzZ_k8dHRoW1zDcy1Z7=5GQ+So4ZkVy2u=nLsk=hA@mail.gmail.com
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/fd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index c6ce7eacf2a..51e2ece3c9d 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -145,6 +145,7 @@ extern int pg_fsync_writethrough(int fd); extern int pg_fdatasync(int fd); extern void pg_flush_data(int fd, off_t offset, off_t amount); extern void fsync_fname(const char *fname, bool isdir); +extern int fsync_fname_ext(const char *fname, bool isdir, bool ignore_perm, int elevel); extern int durable_rename(const char *oldfile, const char *newfile, int loglevel); extern int durable_unlink(const char *fname, int loglevel); extern int durable_link_or_rename(const char *oldfile, const char *newfile, int loglevel); |
