diff --git a/services/postgresql.nix b/services/postgresql.nix index 474ebe2..3fb4463 100644 --- a/services/postgresql.nix +++ b/services/postgresql.nix @@ -19,6 +19,14 @@ enable = true; package = pkgs.postgresql_16; dataDir = service_configs.postgres.dataDir; + settings = { + # ZFS provides checksumming and atomic writes, making PostgreSQL's + # full_page_writes redundant. Disabling reduces write amplification + # and SSD wear on the zpool. + # Did this in conjunction with setting recordsize=8k + # on the zvolume this is on + full_page_writes = false; + }; }; }