From 1ca9bea7c07f1474c2b54b29871d75551fb7a6cb Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Wed, 15 Dec 2021 18:19:45 +0300 Subject: [PATCH] Reduce toast segment size to 2000 --- pageserver/src/branches.rs | 1 + pageserver/src/toast_store.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pageserver/src/branches.rs b/pageserver/src/branches.rs index f0c4c2340a..9ad5d8452b 100644 --- a/pageserver/src/branches.rs +++ b/pageserver/src/branches.rs @@ -182,6 +182,7 @@ fn run_initdb(conf: &'static PageServerConf, initdbpath: &Path) -> Result<()> { let initdb_output = Command::new(initdb_path) .args(&["-D", initdbpath.to_str().unwrap()]) .args(&["-U", &conf.superuser]) + .args(&["-E", "utf8"]) .arg("--no-instructions") // This is only used for a temporary installation that is deleted shortly after, // so no need to fsync it diff --git a/pageserver/src/toast_store.rs b/pageserver/src/toast_store.rs index af2b6f9d0a..73b60211f0 100644 --- a/pageserver/src/toast_store.rs +++ b/pageserver/src/toast_store.rs @@ -16,7 +16,7 @@ use yakv::storage::{ Value, }; -const TOAST_SEGMENT_SIZE: usize = 2 * 1024; +const TOAST_SEGMENT_SIZE: usize = 2000; const CACHE_SIZE: usize = 1024; // 8Mb ///