@@ -208,13 +208,18 @@ start_postmaster(ClusterInfo *cluster)
208
208
* maximum. We assume all datfrozenxid and relfrozen values are less than
209
209
* a gap of 2000000000 from the current xid counter, so autovacuum will
210
210
* not touch them.
211
+ *
212
+ *synchronous_commit=off improves object creation speed, and we only
213
+ *modify the new cluster, so only use it there. If there is a crash,
214
+ *the new cluster has to be recreated anyway.
211
215
*/
212
216
snprintf (cmd ,sizeof (cmd ),
213
- "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d %s %s%s\" start" ,
217
+ "\"%s/pg_ctl\" -w -l \"%s\" -D \"%s\" -o \"-p %d%s%s %s%s\" start" ,
214
218
cluster -> bindir ,SERVER_LOG_FILE ,cluster -> pgconfig ,cluster -> port ,
215
219
(cluster -> controldata .cat_ver >=
216
- BINARY_UPGRADE_SERVER_FLAG_CAT_VER ) ?"-b" :
217
- "-c autovacuum=off -c autovacuum_freeze_max_age=2000000000" ,
220
+ BINARY_UPGRADE_SERVER_FLAG_CAT_VER ) ?" -b" :
221
+ " -c autovacuum=off -c autovacuum_freeze_max_age=2000000000" ,
222
+ (cluster == & new_cluster ) ?" -c synchronous_commit=off" :"" ,
218
223
cluster -> pgopts ?cluster -> pgopts :"" ,socket_string );
219
224
220
225
/*