mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
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: Peter Eisentraut <peter.eisentraut@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/flat/9328.1552952117@sss.pgh.pa.us
This commit is contained in:
parent
28cb0555c1
commit
0befb4f313
@ -376,6 +376,7 @@ check_bin_dir(ClusterInfo *cluster)
|
||||
cluster->bindir);
|
||||
|
||||
validate_exec(cluster->bindir, "postgres");
|
||||
validate_exec(cluster->bindir, "pg_controldata");
|
||||
validate_exec(cluster->bindir, "pg_ctl");
|
||||
|
||||
/*
|
||||
@ -390,12 +391,20 @@ check_bin_dir(ClusterInfo *cluster)
|
||||
validate_exec(cluster->bindir, "pg_resetxlog");
|
||||
else
|
||||
validate_exec(cluster->bindir, "pg_resetwal");
|
||||
|
||||
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_dumpall");
|
||||
validate_exec(cluster->bindir, "pg_restore");
|
||||
validate_exec(cluster->bindir, "psql");
|
||||
validate_exec(cluster->bindir, "vacuumdb");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user