PostgreSQL Source Code git master
|
#include "postgres.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include "archive/archive_module.h"
#include "common/int.h"
#include "miscadmin.h"
#include "storage/copydir.h"
#include "storage/fd.h"
#include "utils/guc.h"
Go to the source code of this file.
Macros | |
#define | CMP_BUF_SIZE (4096) |
Functions | |
static bool | basic_archive_configured (ArchiveModuleState *state) |
static bool | basic_archive_file (ArchiveModuleState *state, const char *file, const char *path) |
static bool | check_archive_directory (char **newval, void **extra, GucSource source) |
static bool | compare_files (const char *file1, const char *file2) |
void | _PG_init (void) |
const ArchiveModuleCallbacks * | _PG_archive_module_init (void) |
Variables | |
PG_MODULE_MAGIC | |
static char * | archive_directory = NULL |
static const ArchiveModuleCallbacks | basic_archive_callbacks |
#define CMP_BUF_SIZE (4096) |
const ArchiveModuleCallbacks * _PG_archive_module_init | ( | void | ) |
Definition at line 82 of file basic_archive.c.
References basic_archive_callbacks.
void _PG_init | ( | void | ) |
Definition at line 62 of file basic_archive.c.
References archive_directory, check_archive_directory(), DefineCustomStringVariable(), gettext_noop, MarkGUCPrefixReserved(), and PGC_SIGHUP.
|
static |
Definition at line 135 of file basic_archive.c.
References arch_module_check_errdetail, and archive_directory.
|
static |
Definition at line 151 of file basic_archive.c.
References archive_directory, compare_files(), copy_file(), DEBUG1, DEBUG3, durable_rename(), elog, epoch, ereport, errcode_for_file_access(), errmsg(), ERROR, fsync_fname(), gettimeofday(), MAXPGPATH, MyProcPid, pg_add_u64_overflow(), pg_mul_u64_overflow(), snprintf, stat, and UINT64_FORMAT.
|
static |
Definition at line 93 of file basic_archive.c.
References GUC_check_errdetail, MAXPGPATH, newval, S_ISDIR, stat::st_mode, and stat.
Referenced by _PG_init().
|
static |
Definition at line 235 of file basic_archive.c.
References CloseTransientFile(), CMP_BUF_SIZE, ereport, errcode_for_file_access(), errmsg(), ERROR, OpenTransientFile(), PG_BINARY, and read.
Referenced by basic_archive_file().
|
static |
Definition at line 42 of file basic_archive.c.
Referenced by _PG_init(), basic_archive_configured(), and basic_archive_file().
|
static |
Definition at line 49 of file basic_archive.c.
Referenced by _PG_archive_module_init().
PG_MODULE_MAGIC |
Definition at line 40 of file basic_archive.c.