#include "postgres_fe.h"
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
#include "common/file_perm.h"
#include "common/file_utils.h"
#include "file_ops.h"
#include "filemap.h"
#include "pg_rewind.h"
Go to the source code of this file.
Definition at line 75 of file file_ops.c.
References close, dstfd, dstpath, and pg_fatal.
Referenced by createBackupLabel(), open_target_file(), and perform_rewind().
Definition at line 156 of file file_ops.c.
References file_entry_t::action, Assert(), create_target_dir(), create_target_symlink(), FILE_ACTION_CREATE, FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR, FILE_TYPE_SYMLINK, FILE_TYPE_UNDEFINED, file_entry_t::path, pg_fatal, file_entry_t::source_link_target, file_entry_t::source_type, and file_entry_t::target_exists.
Referenced by perform_rewind().
Definition at line 229 of file file_ops.c.
References datadir_target, dry_run, dstpath, MAXPGPATH, mkdir, pg_dir_create_mode, pg_fatal, and snprintf.
Referenced by create_target().
Definition at line 257 of file file_ops.c.
References datadir_target, dry_run, dstpath, MAXPGPATH, pg_fatal, snprintf, and symlink.
Referenced by create_target().
Definition at line 47 of file file_ops.c.
References close_target_file(), datadir_target, dry_run, dstfd, dstpath, mode, PG_BINARY, pg_fatal, pg_file_create_mode, and snprintf.
Referenced by createBackupLabel(), libpq_queue_fetch_file(), local_queue_fetch_file(), local_queue_fetch_range(), and process_queued_fetch_requests().
Definition at line 374 of file file_ops.c.
References callback(), closedir(), dirent::d_name, datadir, FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR, FILE_TYPE_SYMLINK, len, lstat, MAXPGPATH, opendir(), pg_fatal, PG_TBLSPC_DIR, readdir(), readlink, recurse_dir(), S_ISDIR, S_ISLNK, S_ISREG, snprintf, stat::st_mode, and stat::st_size.
Referenced by recurse_dir(), and traverse_datadir().
Definition at line 130 of file file_ops.c.
References file_entry_t::action, Assert(), FILE_ACTION_REMOVE, FILE_TYPE_DIRECTORY, FILE_TYPE_REGULAR, FILE_TYPE_SYMLINK, FILE_TYPE_UNDEFINED, file_entry_t::path, pg_fatal, remove_target_dir(), remove_target_file(), remove_target_symlink(), file_entry_t::target_exists, and file_entry_t::target_type.
Referenced by perform_rewind().
Definition at line 243 of file file_ops.c.
References datadir_target, dry_run, dstpath, MAXPGPATH, pg_fatal, and snprintf.
Referenced by remove_target().
Definition at line 187 of file file_ops.c.
References datadir_target, dry_run, dstpath, MAXPGPATH, pg_fatal, and snprintf.
Referenced by process_queued_fetch_requests(), and remove_target().
Definition at line 271 of file file_ops.c.
References datadir_target, dry_run, dstpath, MAXPGPATH, pg_fatal, and snprintf.
Referenced by remove_target().
Definition at line 314 of file file_ops.c.
References close, datadir, fd(), fstat, len, MAXPGPATH, PG_BINARY, pg_fatal, pg_malloc(), read, snprintf, and stat::st_size.
Referenced by getTimelineHistory(), local_fetch_file(), and main().
Definition at line 294 of file file_ops.c.
References datadir_target, do_sync, dry_run, and sync_method.
Referenced by main().
Definition at line 362 of file file_ops.c.
References callback(), datadir, and recurse_dir().
Referenced by local_traverse_files(), and main().
Definition at line 206 of file file_ops.c.
References close, datadir_target, dry_run, dstpath, fd(), MAXPGPATH, pg_fatal, pg_file_create_mode, and snprintf.
Referenced by perform_rewind().
Definition at line 88 of file file_ops.c.
References buf, dry_run, dstfd, dstpath, fetch_done, pg_fatal, progress_report(), and write.
Referenced by createBackupLabel(), local_queue_fetch_file(), local_queue_fetch_range(), and process_queued_fetch_requests().
Definition at line 31 of file file_ops.c.
Referenced by clone_file(), close_target_file(), copy_file(), open_target_file(), and write_target_range().
Definition at line 32 of file file_ops.c.
Referenced by check_db_file_conflict(), close_target_file(), create_target_dir(), create_target_symlink(), CreateDatabaseUsingFileCopy(), CreateDatabaseUsingWalLog(), movedb_failure_callback(), open_target_file(), remove_dbtablespaces(), remove_target_dir(), remove_target_file(), remove_target_symlink(), ResetUnloggedRelationsInDbspaceDir(), truncate_target_file(), and write_target_range().