@@ -161,8 +161,14 @@ prepare_new_cluster(migratorContext *ctx)
161
161
prep_status (ctx ,"Analyzing all rows in the new cluster" );
162
162
exec_prog (ctx , true,
163
163
SYSTEMQUOTE "\"%s/vacuumdb\" --port %d --username \"%s\" "
164
- "--all --analyze >> %s 2>&1" SYSTEMQUOTE ,
165
- ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,ctx -> logfile );
164
+ "--all --analyze >> \"%s\" 2>&1" SYSTEMQUOTE ,
165
+ ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,
166
+ #ifndef WIN32
167
+ ctx -> logfile
168
+ #else
169
+ DEVNULL
170
+ #endif
171
+ );
166
172
check_ok (ctx );
167
173
168
174
/*
@@ -174,8 +180,14 @@ prepare_new_cluster(migratorContext *ctx)
174
180
prep_status (ctx ,"Freezing all rows on the new cluster" );
175
181
exec_prog (ctx , true,
176
182
SYSTEMQUOTE "\"%s/vacuumdb\" --port %d --username \"%s\" "
177
- "--all --freeze >> %s 2>&1" SYSTEMQUOTE ,
178
- ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,ctx -> logfile );
183
+ "--all --freeze >> \"%s\" 2>&1" SYSTEMQUOTE ,
184
+ ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,
185
+ #ifndef WIN32
186
+ ctx -> logfile
187
+ #else
188
+ DEVNULL
189
+ #endif
190
+ );
179
191
check_ok (ctx );
180
192
181
193
get_pg_database_relfilenode (ctx ,CLUSTER_NEW );
@@ -207,7 +219,13 @@ prepare_new_databases(migratorContext *ctx)
207
219
"--no-psqlrc --port %d --username \"%s\" "
208
220
"-f \"%s/%s\" --dbname template1 >> \"%s\"" SYSTEMQUOTE ,
209
221
ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,ctx -> cwd ,
210
- GLOBALS_DUMP_FILE ,ctx -> logfile );
222
+ GLOBALS_DUMP_FILE ,
223
+ #ifndef WIN32
224
+ ctx -> logfile
225
+ #else
226
+ DEVNULL
227
+ #endif
228
+ );
211
229
check_ok (ctx );
212
230
213
231
get_db_and_rel_infos (ctx ,& ctx -> new .dbarr ,CLUSTER_NEW );
@@ -230,7 +248,13 @@ create_new_objects(migratorContext *ctx)
230
248
"--no-psqlrc --port %d --username \"%s\" "
231
249
"-f \"%s/%s\" --dbname template1 >> \"%s\"" SYSTEMQUOTE ,
232
250
ctx -> new .bindir ,ctx -> new .port ,ctx -> user ,ctx -> cwd ,
233
- DB_DUMP_FILE ,ctx -> logfile );
251
+ DB_DUMP_FILE ,
252
+ #ifndef WIN32
253
+ ctx -> logfile
254
+ #else
255
+ DEVNULL
256
+ #endif
257
+ );
234
258
check_ok (ctx );
235
259
236
260
/* regenerate now that we have db schemas */
@@ -282,7 +306,13 @@ copy_clog_xlog_xid(migratorContext *ctx)
282
306
exec_prog (ctx , true,SYSTEMQUOTE "\"%s/pg_resetxlog\" -l %u,%u,%u \"%s\" >> \"%s\" 2>&1" SYSTEMQUOTE ,
283
307
ctx -> new .bindir ,ctx -> old .controldata .chkpnt_tli ,
284
308
ctx -> old .controldata .logid ,ctx -> old .controldata .nxtlogseg ,
285
- ctx -> new .pgdata ,ctx -> logfile );
309
+ ctx -> new .pgdata ,
310
+ #ifndef WIN32
311
+ ctx -> logfile
312
+ #else
313
+ DEVNULL
314
+ #endif
315
+ );
286
316
check_ok (ctx );
287
317
}
288
318