summary refs log tree commit diff
path: root/host/Rory-nginx/services/postgres.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-07-04 14:59:36 +0200
committerRory& <root@rory.gay>2024-07-04 14:59:36 +0200
commitdd7b872694441a96b8b042ccbc4b63a96d0b89b9 (patch)
tree76a25875e08415c38cdb7b5ad8f93241b387d078 /host/Rory-nginx/services/postgres.nix
parentUpdate flake inputs (diff)
downloadRory-Open-Architecture-dd7b872694441a96b8b042ccbc4b63a96d0b89b9.tar.xz
Nixfmt
Diffstat (limited to 'host/Rory-nginx/services/postgres.nix')
-rwxr-xr-xhost/Rory-nginx/services/postgres.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix
index ac3b228..a05aa1e 100755
--- a/host/Rory-nginx/services/postgres.nix
+++ b/host/Rory-nginx/services/postgres.nix
@@ -1,7 +1,12 @@
-{ config, pkgs, lib, ... }:
+{
+  config,
+  pkgs,
+  lib,
+  ...
+}:
 
 {
-  systemd.tmpfiles.rules = [  "d /mnt/postgres/data 0750 postgres postgres" ];
+  systemd.tmpfiles.rules = [ "d /mnt/postgres/data 0750 postgres postgres" ];
 
   services.postgresql = {
     enable = true;
@@ -31,7 +36,7 @@
       work_mem = "512MB";
       maintenance_work_mem = "1024MB";
       huge_pages = "try";
-      effective_cache_size = "60GB"; #was 22
+      effective_cache_size = "60GB"; # was 22
       effective_io_concurrency = "8";
       random_page_cost = 4;
 
@@ -44,7 +49,7 @@
 
       wal_level = "replica";
       max_wal_senders = 0;
-      synchronous_commit = "off"; #was on
+      synchronous_commit = "off"; # was on
 
       checkpoint_timeout = "15min";
       checkpoint_completion_target = "0.9";
@@ -63,10 +68,10 @@
       bgwriter_lru_multiplier = "2.0";
       bgwriter_flush_after = "0";
 
-      max_worker_processes = "32"; #was 14
-      max_parallel_workers_per_gather = "16"; #was 7
-      max_parallel_maintenance_workers = "16"; #was 7
-      max_parallel_workers = "32"; #was 14
+      max_worker_processes = "32"; # was 14
+      max_parallel_workers_per_gather = "16"; # was 7
+      max_parallel_maintenance_workers = "16"; # was 7
+      max_parallel_workers = "32"; # was 14
       parallel_leader_participation = "on";
 
       enable_partitionwise_join = "on";
@@ -81,4 +86,3 @@
   };
 
 }
-