From 8a4f092e82aefb2136b96249daca52cdc4508100 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 13 Oct 2021 16:59:00 +0300 Subject: [PATCH] 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. --- pageserver/src/branches.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pageserver/src/branches.rs b/pageserver/src/branches.rs index 00fd50a2a2..15e56b18e5 100644 --- a/pageserver/src/branches.rs +++ b/pageserver/src/branches.rs @@ -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())