diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-12-03 11:35:57 -0500 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-12-03 12:04:20 -0500 |
commit | 7809134e29c621d621f28f79c19744377d41b20b (patch) | |
tree | faaee405e6b2de67f86e1d5c31190a075bd99954 /nixos/modules | |
parent | 04dd0bb5df018c6d296b16d730ea3c147d530914 (diff) | |
download | nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar.gz nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar.bz2 nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar.lz nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar.xz nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.tar.zst nixpkgs-7809134e29c621d621f28f79c19744377d41b20b.zip |
postgresql: Fix shutdown
Postgres was taking a long time to shutdown. This is because we were sending SIGINT to all processes, apparently confusing the autovacuum launcher. Instead it should only be sent to the main process (which takes care of shutting down the others). The downside is that systemd will also send the final SIGKILL only to the main process, so other processes in the cgroup may be left behind. There should be an option for this...
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/databases/postgresql.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index d99ad2c9c7c..1563858887e 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -211,6 +211,7 @@ in # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See # http://www.postgresql.org/docs/current/static/server-shutdown.html KillSignal = "SIGINT"; + KillMode = "process"; # FIXME: this may cause processes to be left behind in the cgroup even after the final SIGKILL # Give Postgres a decent amount of time to clean up after # receiving systemd's SIGINT. |