|
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 | |
| PG_MODULE_MAGIC_EXT (.name="basic_archive",.version=PG_VERSION) | |
| 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 | |
| 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 85 of file basic_archive.c.
References basic_archive_callbacks.
| void _PG_init | ( | void | ) |
Definition at line 65 of file basic_archive.c.
References archive_directory, check_archive_directory(), DefineCustomStringVariable(), MarkGUCPrefixReserved(), and PGC_SIGHUP.
|
static |
Definition at line 138 of file basic_archive.c.
References arch_module_check_errdetail, and archive_directory.
|
static |
Definition at line 154 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 96 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 238 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().
| PG_MODULE_MAGIC_EXT | ( | . | name = "basic_archive", |
| . | version = PG_VERSION |
||
| ) |
|
static |
Definition at line 45 of file basic_archive.c.
Referenced by _PG_init(), basic_archive_configured(), and basic_archive_file().
|
static |
Definition at line 52 of file basic_archive.c.
Referenced by _PG_archive_module_init().