1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Improve pg_upgrade's checks for required executables.

Don't insist on pg_dumpall and psql being present in the old cluster,
since they are not needed.  Do insist on pg_resetxlog being present
(in both old and new), since we need it.  Also check for pg_config,
but only in the new cluster.  Remove the useless attempt to call
pg_config in the old cluster; we don't need to know the old value of
--pkglibdir.  (In the case of a stripped-down migration installation
there might be nothing there to look at anyway, so any future change
that might reintroduce that need would have to be considered carefully.)

Per my attempts to build a minimal previous-version installation to support
pg_upgrade.
This commit is contained in:
Tom Lane
2010-12-29 13:43:58 -05:00
parent 0fdf735d97
commit ee718c2310
2 changed files with 17 additions and 7 deletions

View File

@ -308,7 +308,11 @@ validateDirectoryOption(migratorContext *ctx, char **dirpath,
static void
get_pkglibdirs(migratorContext *ctx)
{
ctx->old.libpath = get_pkglibdir(ctx, ctx->old.bindir);
/*
* we do not need to know the libpath in the old cluster, and might not
* have a working pg_config to ask for it anyway.
*/
ctx->old.libpath = NULL;
ctx->new.libpath = get_pkglibdir(ctx, ctx->new.bindir);
}