PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/copydir.h"
#include "storage/fd.h"
Go to the source code of this file.
Macros | |
#define | COPY_BUF_SIZE (8 * BLCKSZ) |
#define | FLUSH_DISTANCE (1024 * 1024) |
Functions | |
void | copydir (char *fromdir, char *todir, bool recurse) |
void | copy_file (char *fromfile, char *tofile) |
#define COPY_BUF_SIZE (8 * BLCKSZ) |
Referenced by copy_file().
#define FLUSH_DISTANCE (1024 * 1024) |
Referenced by copy_file().
void copy_file | ( | char * | fromfile, |
char * | tofile | ||
) |
Definition at line 127 of file copydir.c.
References CHECK_FOR_INTERRUPTS, CloseTransientFile(), COPY_BUF_SIZE, dstfd, ereport, errcode_for_file_access(), errmsg(), ERROR, FLUSH_DISTANCE, OpenTransientFile(), palloc(), pfree(), PG_BINARY, pg_flush_data(), pgstat_report_wait_end(), pgstat_report_wait_start(), read, WAIT_EVENT_COPY_FILE_READ, WAIT_EVENT_COPY_FILE_WRITE, and write.
Referenced by copydir(), and ResetUnloggedRelationsInDbspaceDir().
void copydir | ( | char * | fromdir, |
char * | todir, | ||
bool | recurse | ||
) |
Definition at line 37 of file copydir.c.
References AllocateDir(), CHECK_FOR_INTERRUPTS, copy_file(), copydir(), dirent::d_name, enableFsync, ereport, errcode_for_file_access(), errmsg(), ERROR, FreeDir(), fsync_fname(), lstat, MakePGDirectory(), MAXPGPATH, ReadDir(), S_ISDIR, S_ISREG, snprintf, and stat::st_mode.
Referenced by copydir(), createdb(), dbase_redo(), and movedb().