Skip to content

Commit 0befb4f

Browse files
committed
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
1 parent 28cb055 commit 0befb4f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/bin/pg_upgrade/exec.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ check_bin_dir(ClusterInfo *cluster)
376376
cluster->bindir);
377377

378378
validate_exec(cluster->bindir, "postgres");
379+
validate_exec(cluster->bindir, "pg_controldata");
379380
validate_exec(cluster->bindir, "pg_ctl");
380381

381382
/*
@@ -390,12 +391,20 @@ check_bin_dir(ClusterInfo *cluster)
390391
validate_exec(cluster->bindir, "pg_resetxlog");
391392
else
392393
validate_exec(cluster->bindir, "pg_resetwal");
394+
393395
if (cluster == &new_cluster)
394396
{
395-
/* these are only needed in the new cluster */
396-
validate_exec(cluster->bindir, "psql");
397+
/*
398+
* These binaries are only needed for the target version. pg_dump and
399+
* pg_dumpall are used to dump the old cluster, but must be of the
400+
* target version.
401+
*/
402+
validate_exec(cluster->bindir, "initdb");
397403
validate_exec(cluster->bindir, "pg_dump");
398404
validate_exec(cluster->bindir, "pg_dumpall");
405+
validate_exec(cluster->bindir, "pg_restore");
406+
validate_exec(cluster->bindir, "psql");
407+
validate_exec(cluster->bindir, "vacuumdb");
399408
}
400409
}
401410

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy