aboutsummaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/pg_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pg_upgrade/pg_upgrade.c')
-rw-r--r--contrib/pg_upgrade/pg_upgrade.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/pg_upgrade.c b/contrib/pg_upgrade/pg_upgrade.c
index c12f15b875b..63df52996d5 100644
--- a/contrib/pg_upgrade/pg_upgrade.c
+++ b/contrib/pg_upgrade/pg_upgrade.c
@@ -150,6 +150,12 @@ main(int argc, char **argv)
new_cluster.pgdata);
check_ok();
+ prep_status("Sync data directory to disk");
+ exec_prog(UTILITY_LOG_FILE, NULL, true,
+ "\"%s/initdb\" --sync-only \"%s\"", new_cluster.bindir,
+ new_cluster.pgdata);
+ check_ok();
+
create_script_for_cluster_analyze(&analyze_script_file_name);
create_script_for_old_cluster_deletion(&deletion_script_file_name);