tangled
alpha
login
or
join now
pyrox.dev
/
nix
1
fork
atom
My Nix Configuration
1
fork
atom
overview
issues
pulls
pipelines
[hosts.marvin] disable pg autovacuum service
pyrox.dev
4 months ago
94d8a180
7eb841d1
+23
-23
1 changed file
expand all
collapse all
unified
split
hosts
marvin
services
postgres.nix
+23
-23
hosts/marvin/services/postgres.nix
reviewed
···
1
1
-
{ pkgs, config, ... }:
2
2
-
let
3
3
-
cfg = config.services.postgresql;
4
4
-
in
1
1
+
{ pkgs, ... }:
2
2
+
# let
3
3
+
# cfg = config.services.postgresql;
4
4
+
# in
5
5
{
6
6
services.postgresql = {
7
7
enable = true;
···
28
28
max_parallel_maintenance_workers = 4;
29
29
};
30
30
};
31
31
-
systemd.timers.pg-autovacuum = {
32
32
-
description = "Timer for Postgres Autovacuum";
33
33
-
timerConfig = {
34
34
-
OnCalendar = "*-*-* 01:00:00";
35
35
-
Unit = "pg-autovacuum.service";
36
36
-
};
37
37
-
};
38
38
-
systemd.services.pg-autovacuum = {
39
39
-
description = "Vacuum all Postgres databases.";
40
40
-
requisite = [ "postgresql.service" ];
41
41
-
wantedBy = [ "multi-user.target" ];
42
42
-
serviceConfig = {
43
43
-
Type = "oneshot";
44
44
-
User = "postgres";
45
45
-
Group = "postgres";
46
46
-
SyslogIdentifier = "pg-autovacuum";
47
47
-
ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
48
48
-
};
49
49
-
};
31
31
+
# systemd.timers.pg-autovacuum = {
32
32
+
# description = "Timer for Postgres Autovacuum";
33
33
+
# timerConfig = {
34
34
+
# OnCalendar = "*-*-* 01:00:00";
35
35
+
# Unit = "pg-autovacuum.service";
36
36
+
# };
37
37
+
# };
38
38
+
# systemd.services.pg-autovacuum = {
39
39
+
# description = "Vacuum all Postgres databases.";
40
40
+
# requisite = [ "postgresql.service" ];
41
41
+
# wantedBy = [ "multi-user.target" ];
42
42
+
# serviceConfig = {
43
43
+
# Type = "oneshot";
44
44
+
# User = "postgres";
45
45
+
# Group = "postgres";
46
46
+
# SyslogIdentifier = "pg-autovacuum";
47
47
+
# ExecStart = "${cfg.package}/bin/vacuumdb --all --echo --jobs=6 --parallel=5 --analyze --verbose";
48
48
+
# };
49
49
+
# };
50
50
}