PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
#include "common/file_utils.h"
#include "common/logging.h"
Go to the source code of this file.
Macros | |
#define | MINIMUM_VERSION_FOR_PG_WAL 100000 |
Functions | |
static void | walkdir (const char *path, int(*action)(const char *fname, bool isdir), bool process_symlinks) |
void | fsync_pgdata (const char *pg_data, int serverVersion) |
void | fsync_dir_recurse (const char *dir) |
int | fsync_fname (const char *fname, bool isdir) |
int | fsync_parent_path (const char *fname) |
int | durable_rename (const char *oldfile, const char *newfile) |
#define MINIMUM_VERSION_FOR_PG_WAL 100000 |
Definition at line 36 of file file_utils.c.
Referenced by fsync_pgdata().
int durable_rename | ( | const char * | oldfile, |
const char * | newfile | ||
) |
Definition at line 340 of file file_utils.c.
References close, fd(), fsync, fsync_fname(), fsync_parent_path(), PG_BINARY, and pg_log_error.
void fsync_dir_recurse | ( | const char * | dir | ) |
Definition at line 122 of file file_utils.c.
References fsync_fname(), and walkdir().
Referenced by _CloseArchive(), and BaseBackup().
int fsync_fname | ( | const char * | fname, |
bool | isdir | ||
) |
Definition at line 257 of file file_utils.c.
References close, data_sync_elevel(), ERROR, fd(), fsync, fsync_fname_ext(), PG_BINARY, and pg_log_error.
Referenced by durable_rename(), fsync_dir_recurse(), fsync_parent_path(), and fsync_pgdata().
int fsync_parent_path | ( | const char * | fname | ) |
Definition at line 313 of file file_utils.c.
References fsync_fname(), get_parent_directory(), MAXPGPATH, and strlcpy().
Referenced by durable_rename().
void fsync_pgdata | ( | const char * | pg_data, |
int | serverVersion | ||
) |
Definition at line 58 of file file_utils.c.
References fsync_fname(), lstat, MAXPGPATH, MINIMUM_VERSION_FOR_PG_WAL, pg_log_error, pgwin32_is_junction(), snprintf, stat, and walkdir().
Referenced by BaseBackup(), main(), and syncTargetDirectory().
|
static |
Definition at line 150 of file file_utils.c.
References generate_unaccent_rules::action, close, closedir(), dirent::d_name, fd(), lstat, MAXPGPATH, opendir(), PG_BINARY, pg_log_error, readdir(), S_ISDIR, S_ISREG, snprintf, stat, and subpath().
Referenced by fsync_dir_recurse(), and fsync_pgdata().