diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index c8a8c52..e014336 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1107,6 +1107,23 @@ setup_config(void)
 							  "#update_process_title = off");
 #endif
 
+#ifdef HAVE_SYNC_FILE_RANGE
+	/*
+	 * see default in server/storage/bufmgr.h:
+	 * DEFAULT_CHECKPOINT_FLUSH_AFTER 32
+	 * DEFAULT_BGWRITER_FLUSH_AFTER 64
+	 */
+	snprintf(repltok, sizeof(repltok), "#checkpoint_flush_after = %dkb",
+			 32 * (BLCKSZ / 1024));
+	conflines = replace_token(conflines, "#checkpoint_flush_after = 0",
+							  repltok);
+
+	snprintf(repltok, sizeof(repltok), "#bgwriter_flush_after = %dkb",
+			 64 * (BLCKSZ / 1024));
+	conflines = replace_token(conflines, "#bgwriter_flush_after = 0",
+							  repltok);
+#endif   /* HAVE_SYNC_FILE_RANGE */
+
 	snprintf(path, sizeof(path), "%s/postgresql.conf", pg_data);
 
 	writefile(path, conflines);
