Go to the source code of this file.
◆ RestoreArchivedFile()
Definition at line 39 of file archive.c.
41{
44 int rc;
46
48
51
52
53
54
55
59
60 if (rc == 0)
61 {
62
63
64
65
67 {
69 pg_fatal(
"unexpected file size for \"%s\": %lld instead of %lld",
72 else
73 {
75
77 pg_fatal(
"could not open file \"%s\" restored from archive: %m",
79 else
81 }
82 }
83 else
84 {
86 pg_fatal(
"could not stat file \"%s\": %m",
88 }
89 }
90
91
92
93
94
95
96
98 pg_fatal(
"\"restore_command\" failed: %s",
100
101
102
103
104
105 pg_log_error(
"could not restore file \"%s\" from archive",
107 return -1;
108}
char * BuildRestoreCommand(const char *restoreCommand, const char *xlogpath, const char *xlogfname, const char *lastRestartPointFname)
#define pg_log_error(...)
void pfree(void *pointer)
char * wait_result_to_str(int exitstatus)
bool wait_result_is_any_signal(int exit_status, bool include_command_not_found)
References BuildRestoreCommand(), fb(), MAXPGPATH, pfree(), PG_BINARY, pg_fatal, pg_log_error, snprintf, stat, wait_result_is_any_signal(), wait_result_to_str(), and XLOGDIR.