Compress Postgres logs
This commit is contained in:
@@ -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"
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user