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