My Nix Configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[marvin] upgrade postgres to pg18

dish b688fafa d803c1ef

+13 -9
+13 -9
hosts/marvin/services/databases.nix
··· 3 3 services = { 4 4 postgresql = { 5 5 enable = true; 6 - package = pkgs.postgresql_16; 7 - enableJIT = true; 6 + package = pkgs.postgresql_18; 8 7 # Settings taken from [PGTune](https://pgtune.leopard.in.ua/) 9 - # https://pgtune.leopard.in.ua/?dbVersion=16&osType=linux&dbType=mixed&cpuNum&totalMemory=16&totalMemoryUnit=GB&connectionNum&hdType=ssd 8 + # Current config URL: 9 + # https://pgtune.leopard.in.ua/?dbVersion=18&osType=linux&dbType=mixed&cpuNum=24&totalMemory=16&totalMemoryUnit=GB&connectionNum=100&hdType=nvme&dbSize=greater_ram 10 10 settings = { 11 11 # PGTune Settings 12 - max_connections = "300"; 12 + max_connections = "100"; 13 13 shared_buffers = "4GB"; 14 14 effective_cache_size = "12GB"; 15 15 maintenance_work_mem = "1GB"; ··· 17 17 wal_buffers = "16MB"; 18 18 default_statistics_target = 100; 19 19 random_page_cost = 1.1; 20 - effective_io_concurrency = 200; 21 - work_mem = "19418kB"; 22 - huge_pages = "off"; 20 + effective_io_concurrency = 1000; 21 + work_mem = "16270kB"; 22 + huge_pages = "try"; 23 + jit = "off"; 24 + wal_compression = "lz4"; 25 + autovacuum_max_workers = 4; 26 + io_method = "io_uring"; 27 + io_workers = 4; 23 28 min_wal_size = "1GB"; 24 29 max_wal_size = "4GB"; 25 - 26 30 max_worker_processes = 16; 27 - max_parallel_workers = 16; 28 31 max_parallel_workers_per_gather = 4; 32 + max_parallel_workers = 16; 29 33 max_parallel_maintenance_workers = 4; 30 34 }; 31 35 };