61 char *nativePath = NULL;
71 "archive_command",
"fp",
80 rc = system(xlogarchcmd);
98 (
errmsg(
"archive command failed with exit code %d",
100 errdetail(
"The failed archive command was: %s",
107 (
errmsg(
"archive command was terminated by exception 0x%X",
109 errhint(
"See C include file \"ntstatus.h\" for a description of the hexadecimal value."),
110 errdetail(
"The failed archive command was: %s",
114 (
errmsg(
"archive command was terminated by signal %d: %s",
116 errdetail(
"The failed archive command was: %s",
123 (
errmsg(
"archive command exited with unrecognized status %d",
125 errdetail(
"The failed archive command was: %s",
134 elog(
DEBUG1,
"archived write-ahead log file \"%s\"", file);
141 elog(
DEBUG1,
"archiver process shutting down");
#define arch_module_check_errdetail
int errmsg_internal(const char *fmt,...)
int errdetail(const char *fmt,...)
int errhint(const char *fmt,...)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
static void const char fflush(stdout)
char * pstrdup(const char *in)
void pfree(void *pointer)
char * replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
const char * pg_strsignal(int signum)
void make_native_path(char *filename)
static void shell_archive_shutdown(ArchiveModuleState *state)
static const ArchiveModuleCallbacks shell_archive_callbacks
const ArchiveModuleCallbacks * shell_archive_init(void)
static bool shell_archive_configured(ArchiveModuleState *state)
static bool shell_archive_file(ArchiveModuleState *state, const char *file, const char *path)
ArchiveStartupCB startup_cb
bool wait_result_is_any_signal(int exit_status, bool include_command_not_found)
static void pgstat_report_wait_start(uint32 wait_event_info)
static void pgstat_report_wait_end(void)
char * XLogArchiveCommand