|
14 | 14 |
|
15 | 15 |
|
16 | 16 | static void check_data_dir(migratorContext *ctx, const char *pg_data);
|
17 |
| -static void check_bin_dir(migratorContext *ctx, ClusterInfo *cluster); |
| 17 | +static void check_bin_dir(migratorContext *ctx, ClusterInfo *cluster, Cluster whichCluster); |
18 | 18 | static int check_exec(migratorContext *ctx, const char *dir, const char *cmdName);
|
19 | 19 | static const char *validate_exec(const char *path);
|
20 | 20 |
|
@@ -99,15 +99,15 @@ verify_directories(migratorContext *ctx)
|
99 | 99 | check_ok(ctx);
|
100 | 100 |
|
101 | 101 | prep_status(ctx, "Checking old bin directory (%s)", ctx->old.bindir);
|
102 |
| - check_bin_dir(ctx, &ctx->old); |
| 102 | + check_bin_dir(ctx, &ctx->old, CLUSTER_OLD); |
103 | 103 | check_ok(ctx);
|
104 | 104 |
|
105 | 105 | prep_status(ctx, "Checking new data directory (%s)", ctx->new.pgdata);
|
106 | 106 | check_data_dir(ctx, ctx->new.pgdata);
|
107 | 107 | check_ok(ctx);
|
108 | 108 |
|
109 | 109 | prep_status(ctx, "Checking new bin directory (%s)", ctx->new.bindir);
|
110 |
| - check_bin_dir(ctx, &ctx->new); |
| 110 | + check_bin_dir(ctx, &ctx->new, CLUSTER_NEW); |
111 | 111 | check_ok(ctx);
|
112 | 112 | }
|
113 | 113 |
|
@@ -158,12 +158,18 @@ check_data_dir(migratorContext *ctx, const char *pg_data)
|
158 | 158 | * exit().
|
159 | 159 | */
|
160 | 160 | static void
|
161 |
| -check_bin_dir(migratorContext *ctx, ClusterInfo *cluster) |
| 161 | +check_bin_dir(migratorContext *ctx, ClusterInfo *cluster, Cluster whichCluster) |
162 | 162 | {
|
163 | 163 | check_exec(ctx, cluster->bindir, "postgres");
|
164 |
| - check_exec(ctx, cluster->bindir, "psql"); |
165 | 164 | check_exec(ctx, cluster->bindir, "pg_ctl");
|
166 |
| - check_exec(ctx, cluster->bindir, "pg_dumpall"); |
| 165 | + check_exec(ctx, cluster->bindir, "pg_resetxlog"); |
| 166 | + if (whichCluster == CLUSTER_NEW) |
| 167 | + { |
| 168 | + /* these are only needed in the new cluster */ |
| 169 | + check_exec(ctx, cluster->bindir, "pg_config"); |
| 170 | + check_exec(ctx, cluster->bindir, "psql"); |
| 171 | + check_exec(ctx, cluster->bindir, "pg_dumpall"); |
| 172 | + } |
167 | 173 | }
|
168 | 174 |
|
169 | 175 |
|
|
0 commit comments