Skip syncing the temp initdb installation.

Doesn't make much difference on my laptop with SSD, but every little
helps, and with a slower disk it might be noticeable.
This commit is contained in:
Heikki Linnakangas
2021-10-13 16:59:00 +03:00
parent 6b6b3f68be
commit 8a4f092e82

View File

@@ -183,6 +183,9 @@ fn run_initdb(conf: &'static PageServerConf, initdbpath: &Path) -> Result<()> {
.args(&["-D", initdbpath.to_str().unwrap()])
.args(&["-U", &conf.superuser])
.arg("--no-instructions")
// This is only used for a temporary installation that is deleted shortly after,
// so no need to fsync it
.arg("--no-sync")
.env_clear()
.env("LD_LIBRARY_PATH", conf.pg_lib_dir().to_str().unwrap())
.env("DYLD_LIBRARY_PATH", conf.pg_lib_dir().to_str().unwrap())