mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
nixos/postgresql: move postStart into separate unit
This avoids restarting the postgresql server, when only ensureDatabases or ensureUsers have been changed. It will also allow to properly wait for recovery to finish later. To wait for "postgresql is ready" in other services, we now provide a postgresql.target. Resolves #400018 Co-authored-by: Marcel <me@m4rc3l.de>
This commit is contained in:
parent
c119848700
commit
41c5662cbe
139 changed files with 391 additions and 424 deletions
|
@ -328,7 +328,7 @@ in
|
|||
description = "Zabbix Server";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
|
||||
after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.target";
|
||||
|
||||
path = [ "/run/wrappers" ] ++ cfg.extraPackages;
|
||||
preStart =
|
||||
|
@ -374,7 +374,7 @@ in
|
|||
|
||||
systemd.services.httpd.after =
|
||||
optional (config.services.zabbixWeb.enable && mysqlLocal) "mysql.service"
|
||||
++ optional (config.services.zabbixWeb.enable && pgsqlLocal) "postgresql.service";
|
||||
++ optional (config.services.zabbixWeb.enable && pgsqlLocal) "postgresql.target";
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue