about summary refs log tree commit diff
path: root/matrix.nix
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-02-16 13:52:38 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-02-16 13:52:38 +0900
commit1e2d08072b1fb363b2ba63c6ea969bda729d5363 (patch)
treed4b13600b06ef0db7f5c3aec8552f27ba00e31cd /matrix.nix
parent5978e221fd6976b371982ecaf33a710fe1cee9f6 (diff)
downloadnixos-conf-1e2d08072b1fb363b2ba63c6ea969bda729d5363.tar.gz
Upgrade to PostgreSQL 15 and tune a bit
Diffstat (limited to 'matrix.nix')
-rw-r--r--matrix.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/matrix.nix b/matrix.nix
index e883918..b3bc773 100644
--- a/matrix.nix
+++ b/matrix.nix
@@ -111,7 +111,20 @@ in {
           ensurePermissions."DATABASE dendrite" = "ALL PRIVILEGES";
         }
       ];
-      package = pkgs.postgresql_14;
+      package = pkgs.postgresql_15;
+      settings = {
+        checkpoint_timeout = "5min";
+        effective_cache_size = "1GB";
+        effective_io_concurrency = 100;
+        maintenance_work_mem = "320MB";
+        max_parallel_maintenance_workers = 4;
+        max_parallel_workers_per_gather = 4;
+        max_wal_senders = 0;
+        random_page_cost = 1.25;
+        shared_buffers = "512MB";
+        wal_buffers = -1;
+        work_mem = "32MB";
+      };
     };
   };