Commit 0befb4f3 authored by Peter Eisentraut's avatar Peter Eisentraut

pg_upgrade: Check all used executables

Expand the validate_exec() calls to cover all the used binaries.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: default avatarPeter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us
parent 28cb0555
...@@ -376,6 +376,7 @@ check_bin_dir(ClusterInfo *cluster) ...@@ -376,6 +376,7 @@ check_bin_dir(ClusterInfo *cluster)
cluster->bindir); cluster->bindir);
validate_exec(cluster->bindir, "postgres"); validate_exec(cluster->bindir, "postgres");
validate_exec(cluster->bindir, "pg_controldata");
validate_exec(cluster->bindir, "pg_ctl"); validate_exec(cluster->bindir, "pg_ctl");
/* /*
...@@ -390,12 +391,20 @@ check_bin_dir(ClusterInfo *cluster) ...@@ -390,12 +391,20 @@ check_bin_dir(ClusterInfo *cluster)
validate_exec(cluster->bindir, "pg_resetxlog"); validate_exec(cluster->bindir, "pg_resetxlog");
else else
validate_exec(cluster->bindir, "pg_resetwal"); validate_exec(cluster->bindir, "pg_resetwal");
if (cluster == &new_cluster) if (cluster == &new_cluster)
{ {
/* these are only needed in the new cluster */ /*
validate_exec(cluster->bindir, "psql"); * These binaries are only needed for the target version. pg_dump and
* pg_dumpall are used to dump the old cluster, but must be of the
* target version.
*/
validate_exec(cluster->bindir, "initdb");
validate_exec(cluster->bindir, "pg_dump"); validate_exec(cluster->bindir, "pg_dump");
validate_exec(cluster->bindir, "pg_dumpall"); validate_exec(cluster->bindir, "pg_dumpall");
validate_exec(cluster->bindir, "pg_restore");
validate_exec(cluster->bindir, "psql");
validate_exec(cluster->bindir, "vacuumdb");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment