36 extern int fsync_fname(
const char *fname,
bool isdir);
37 extern void sync_pgdata(
const char *
pg_data,
int serverVersion,
40 extern int durable_rename(
const char *oldfile,
const char *newfile);
46 bool look_through_symlinks,
50 const struct iovec *
source,
55 const struct iovec *iov,
62 #define PG_TEMP_FILES_DIR "pgsql_tmp"
63 #define PG_TEMP_FILE_PREFIX "pgsql_tmp"
int durable_rename(const char *oldfile, const char *newfile, int elevel)
void fsync_fname(const char *fname, bool isdir)
static int fsync_parent_path(const char *fname, int elevel)
int compute_remaining_iovec(struct iovec *destination, const struct iovec *source, int iovcnt, size_t transferred)
ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset)
@ DATA_DIR_SYNC_METHOD_SYNCFS
@ DATA_DIR_SYNC_METHOD_FSYNC
ssize_t pg_pwritev_with_retry(int fd, const struct iovec *iov, int iovcnt, off_t offset)
PGFileType get_dirent_type(const char *path, const struct dirent *de, bool look_through_symlinks, int elevel)
static DataDirSyncMethod sync_method
static rewind_source * source
static int fd(const char *x, int i)
static pg_noinline void Size size