Code cleanup
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 12 Jan 2023 06:37:39 +0000 (07:37 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 12 Jan 2023 06:37:39 +0000 (07:37 +0100)
for commit c96de2ce1782116bd0489b1cd69ba88189a495e8

Author: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/20230111185434.GA1912982@nathanxps13

src/backend/access/transam/xlogarchive.c
src/common/archive.c

index f911e8c3a6ff8287272cda103efee8cde81061ac..fcc87ff44fd26f02a43fea0d98d48ca3c084aa07 100644 (file)
@@ -154,9 +154,6 @@ RestoreArchivedFile(char *path, const char *xlogfname,
    xlogRestoreCmd = BuildRestoreCommand(recoveryRestoreCommand,
                                         xlogpath, xlogfname,
                                         lastRestartPointFname);
-   if (xlogRestoreCmd == NULL)
-       elog(ERROR, "could not build restore command \"%s\"",
-            recoveryRestoreCommand);
 
    ereport(DEBUG3,
            (errmsg_internal("executing restore command \"%s\"",
index de42e914f749b0ec19666e81a0c30a0bac86cb8f..641a58ee888334382eb49592abd294a2df623f4b 100644 (file)
@@ -33,7 +33,7 @@
  * The result is a palloc'd string for the restore command built.  The
  * caller is responsible for freeing it.  If any of the required arguments
  * is NULL and that the corresponding alias is found in the command given
- * by the caller, then NULL is returned.
+ * by the caller, then an error is thrown.
  */
 char *
 BuildRestoreCommand(const char *restoreCommand,