]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Add missing exit() in pg_verifybackup when failing to find pg_waldump
authorMichael Paquier <michael@paquier.xyz>
Thu, 29 Jul 2021 02:00:00 +0000 (11:00 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 29 Jul 2021 02:00:00 +0000 (11:00 +0900)
pg_verifybackup needs by default pg_waldump to check after a range of
WAL segments required for a backup, except if --no-parse-wal is
specified.  The code checked for the presence of the binary pg_waldump
in an installation and reported an error, but it forgot to properly
exit().  This could lead to confusing errors reported.

Reviewed-by: Robert Haas, Fabien Coelho
Discussion: https://postgr.es/m/YQDMdB+B68yePFeT@paquier.xyz
Backpatch-through: 13

src/bin/pg_verifybackup/pg_verifybackup.c

index 20140aa02748aec37ae7f680086f15f14655c94f..f2ab2c526b985927e84c5c5148a78b0c1652b04c 100644 (file)
@@ -304,6 +304,7 @@ main(int argc, char **argv)
                                                         "but was not the same version as %s.\n"
                                                         "Check your installation.",
                                                         "pg_waldump", full_path, "pg_verifybackup");
+                       exit(1);
                }
        }