Compress Postgres logs

This commit is contained in:
Greg Hellings
2023-03-18 06:19:10 +00:00
parent 357c053e8e
commit 7a10947153
4 changed files with 69 additions and 3 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
services.postgresql = {
@@ -53,6 +53,10 @@ root root postgres
postgresLog = {
enable = true;
files = "/var/lib/postgresql/*/log/*.log";
extraConfig = (lib.strings.concatStringsSep "\n" [
"compress"
"compresscmd=${pkgs.xz}/bin/xz"
]);
};
};
};