+23
-23
hosts/marvin/services/postgres.nix
+23
-23
hosts/marvin/services/postgres.nix
···
1
-
{ pkgs, config, ... }:
2
-
let
3
-
cfg = config.services.postgresql;
4
-
in
1
+
{ pkgs, ... }:
2
+
# let
3
+
# cfg = config.services.postgresql;
4
+
# in
5
5
{
6
6
services.postgresql = {
7
7
enable = true;
···
28
28
max_parallel_maintenance_workers = 4;
29
29
};
30
30
};
31
-
systemd.timers.pg-autovacuum = {
32
-
description = "Timer for Postgres Autovacuum";
33
-
timerConfig = {
34
-
OnCalendar = "*-*-* 01:00:00";
35
-
Unit = "pg-autovacuum.service";
36
-
};
37
-
};
38
-
systemd.services.pg-autovacuum = {
39
-
description = "Vacuum all Postgres databases.";
40
-
requisite = [ "postgresql.service" ];
41
-
wantedBy = [ "multi-user.target" ];
42
-
serviceConfig = {
43
-
Type = "oneshot";
44
-
User = "postgres";
45
-
Group = "postgres";
46
-
SyslogIdentifier = "pg-autovacuum";
47
-
ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
48
-
};
49
-
};
31
+
# systemd.timers.pg-autovacuum = {
32
+
# description = "Timer for Postgres Autovacuum";
33
+
# timerConfig = {
34
+
# OnCalendar = "*-*-* 01:00:00";
35
+
# Unit = "pg-autovacuum.service";
36
+
# };
37
+
# };
38
+
# systemd.services.pg-autovacuum = {
39
+
# description = "Vacuum all Postgres databases.";
40
+
# requisite = [ "postgresql.service" ];
41
+
# wantedBy = [ "multi-user.target" ];
42
+
# serviceConfig = {
43
+
# Type = "oneshot";
44
+
# User = "postgres";
45
+
# Group = "postgres";
46
+
# SyslogIdentifier = "pg-autovacuum";
47
+
# ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
48
+
# };
49
+
# };
50
50
}