Definition at line 58 of file shell_archive.c.
60{
63 int rc;
64
65 if (path)
66 {
69 }
70
72 "archive_command", "fp",
74
78
83
84 if (rc != 0)
85 {
86
87
88
89
90
91
92
93
95
97 {
99 (
errmsg(
"archive command failed with exit code %d",
101 errdetail(
"The failed archive command was: %s",
103 }
105 {
106#if defined(WIN32)
108 (
errmsg(
"archive command was terminated by exception 0x%X",
110 errhint(
"See C include file \"ntstatus.h\" for a description of the hexadecimal value."),
111 errdetail(
"The failed archive command was: %s",
113#else
115 (
errmsg(
"archive command was terminated by signal %d: %s",
117 errdetail(
"The failed archive command was: %s",
119#endif
120 }
121 else
122 {
124 (
errmsg(
"archive command exited with unrecognized status %d",
125 rc),
126 errdetail(
"The failed archive command was: %s",
128 }
130
131 return false;
132 }
134
135 elog(
DEBUG1,
"archived write-ahead log file \"%s\"", file);
136 return true;
137}
int errhint(const char *fmt,...) pg_attribute_printf(1
int errdetail(const char *fmt,...) pg_attribute_printf(1
int int errmsg_internal(const char *fmt,...) pg_attribute_printf(1
#define ereport(elevel,...)
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)
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)
References DEBUG1, DEBUG3, elog, ereport, errdetail(), errhint(), errmsg, errmsg_internal(), FATAL, fb(), LOG, make_native_path(), pfree(), pg_strsignal(), pgstat_report_wait_end(), pgstat_report_wait_start(), pstrdup(), replace_percent_placeholders(), wait_result_is_any_signal(), WEXITSTATUS, WIFEXITED, WIFSIGNALED, WTERMSIG, and XLogArchiveCommand.