summaryrefslogtreecommitdiff
path: root/src/include/access/xlogarchive.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-02-06 08:28:42 +0900
committerMichael Paquier <michael@paquier.xyz>2023-02-06 08:28:42 +0900
commit2f6e15ac93c58c1140e4a4affe61e78f7346497a (patch)
treed2757eb6b456c8f3d882d53d711792d5ee2fdee4 /src/include/access/xlogarchive.h
parentb2d0e13a0a4c31167d01e9871f907060c80b8fae (diff)
Revert refactoring of restore command code to shell_restore.c
This reverts commits 24c35ec and 57169ad. PreRestoreCommand() and PostRestoreCommand() need to be put closer to the system() call calling a restore_command, as they enable in_restore_command for the startup process which would in turn trigger an immediate proc_exit() in the SIGTERM handler. Perhaps we could get rid of this behavior entirely, but 24c35ec has made the window where the flag is enabled much larger than it was, and any Postgres-like actions (palloc, etc.) taken by code paths while the flag is enabled could lead to more severe issues in the shutdown processing. Note that curculio has showed that there are much more problems in this area, unrelated to this change, actually, hence the issues related to that had better be addressed first. Keeping the code of HEAD in line with the stable branches should make that a bit easier. Per discussion with Andres Freund and Nathan Bossart. Discussion: https://postgr.es/m/Y979NR3U5VnWrTwB@paquier.xyz
Diffstat (limited to 'src/include/access/xlogarchive.h')
-rw-r--r--src/include/access/xlogarchive.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/include/access/xlogarchive.h b/src/include/access/xlogarchive.h
index 299304703e1..31ff2060340 100644
--- a/src/include/access/xlogarchive.h
+++ b/src/include/access/xlogarchive.h
@@ -20,6 +20,8 @@
extern bool RestoreArchivedFile(char *path, const char *xlogfname,
const char *recovername, off_t expectedSize,
bool cleanupEnabled);
+extern void ExecuteRecoveryCommand(const char *command, const char *commandName,
+ bool failOnSignal, uint32 wait_event_info);
extern void KeepFileRestoredFromArchive(const char *path, const char *xlogfname);
extern void XLogArchiveNotify(const char *xlog);
extern void XLogArchiveNotifySeg(XLogSegNo segno, TimeLineID tli);
@@ -30,9 +32,4 @@ extern bool XLogArchiveIsReady(const char *xlog);
extern bool XLogArchiveIsReadyOrDone(const char *xlog);
extern void XLogArchiveCleanup(const char *xlog);
-extern bool shell_restore(const char *file, const char *path,
- const char *lastRestartPointFileName);
-extern void shell_archive_cleanup(const char *lastRestartPointFileName);
-extern void shell_recovery_end(const char *lastRestartPointFileName);
-
#endif /* XLOG_ARCHIVE_H */