111 errmsg(
"could not stat file \"%s\": %m",
119 errmsg(
"could not remove file \"%s\": %m",
213 (
errmsg(
"archive file \"%s\" has wrong size: %lld instead of %lld",
222 (
errmsg(
"restored log file \"%s\" from archive",
236 errdetail(
"\"restore_command\" returned a zero exit status, but stat() failed.")));
268 (
errmsg(
"could not restore file \"%s\" from archive: %s",
389 errmsg(
"could not rename file \"%s\" to \"%s\": %m",
399 errmsg(
"could not remove file \"%s\": %m",
456 errmsg(
"could not create archive status file \"%s\": %m",
464 errmsg(
"could not write archive status file \"%s\": %m",
536 errmsg(
"could not create archive status file \"%s\": %m",
544 errmsg(
"could not write archive status file \"%s\": %m",
void PreRestoreCommand(void)
void PostRestoreCommand(void)
#define Assert(condition)
char * BuildRestoreCommand(const char *restoreCommand, const char *xlogpath, const char *xlogfname, const char *lastRestartPointFname)
int errmsg_internal(const char *fmt,...)
int errcode_for_file_access(void)
int errdetail(const char *fmt,...)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
int durable_rename(const char *oldfile, const char *newfile, int elevel)
FILE * AllocateFile(const char *name, const char *mode)
void pfree(void *pointer)
static char xlogfpath[MAXPGPATH]
char * replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
void PgArchForceDirScan(void)
size_t strlcpy(char *dst, const char *src, size_t siz)
static int fd(const char *x, int i)
char * wait_result_to_str(int exitstatus)
bool wait_result_is_signal(int exit_status, int signum)
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)
void WalSndWakeup(bool physical, bool logical)
void WalSndRqstFileReload(void)
RecoveryState GetRecoveryState(void)
void GetOldestRestartPoint(XLogRecPtr *oldrecptr, TimeLineID *oldtli)
#define XLogArchivingActive()
#define XLogArchivingAlways()
static bool IsTLHistoryFileName(const char *fname)
static void StatusFilePath(char *path, const char *xlog, const char *suffix)
#define XLByteToSeg(xlrp, logSegNo, wal_segsz_bytes)
static void XLogFileName(char *fname, TimeLineID tli, XLogSegNo logSegNo, int wal_segsz_bytes)
void XLogArchiveForceDone(const char *xlog)
bool XLogArchiveIsReadyOrDone(const char *xlog)
bool XLogArchiveIsBusy(const char *xlog)
bool XLogArchiveIsReady(const char *xlog)
void XLogArchiveNotifySeg(XLogSegNo segno, TimeLineID tli)
void ExecuteRecoveryCommand(const char *command, const char *commandName, bool failOnSignal, uint32 wait_event_info)
bool XLogArchiveCheckDone(const char *xlog)
bool RestoreArchivedFile(char *path, const char *xlogfname, const char *recovername, off_t expectedSize, bool cleanupEnabled)
void XLogArchiveNotify(const char *xlog)
void KeepFileRestoredFromArchive(const char *path, const char *xlogfname)
void XLogArchiveCleanup(const char *xlog)
bool ArchiveRecoveryRequested
char * recoveryRestoreCommand