56 char *nativePath = NULL;
66 "archive_command",
"fp",
78 rc = system(xlogarchcmd);
96 (
errmsg(
"archive command failed with exit code %d",
98 errdetail(
"The failed archive command was: %s",
105 (
errmsg(
"archive command was terminated by exception 0x%X",
107 errhint(
"See C include file \"ntstatus.h\" for a description of the hexadecimal value."),
108 errdetail(
"The failed archive command was: %s",
112 (
errmsg(
"archive command was terminated by signal %d: %s",
114 errdetail(
"The failed archive command was: %s",
121 (
errmsg(
"archive command exited with unrecognized status %d",
123 errdetail(
"The failed archive command was: %s",
132 elog(
DEBUG1,
"archived write-ahead log file \"%s\"", file);
139 elog(
DEBUG1,
"archiver process shutting down");
elog(ERROR, "%s: %s", p2, msg)
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)
@ WAIT_EVENT_ARCHIVE_COMMAND
static void pgstat_report_wait_start(uint32 wait_event_info)
static void pgstat_report_wait_end(void)
char * XLogArchiveCommand