From b603babd0f323ebc596f6101fa1fee584d411af9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 30 Apr 2012 18:15:32 +0000 Subject: [PATCH] * Use PostgreSQL's fast shutdown mode. In the default smart shutdown mode, Postgres waits until all active connections have closed, which can take an unbounded amount of time. svn path=/nixos/trunk/; revision=33959 --- modules/services/databases/postgresql.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/services/databases/postgresql.nix b/modules/services/databases/postgresql.nix index 8ef272404e0..1633b9d0fdd 100644 --- a/modules/services/databases/postgresql.nix +++ b/modules/services/databases/postgresql.nix @@ -188,8 +188,12 @@ in extraConfig = '' + # Shut down Postgres using SIGINT ("Fast Shutdown mode"). See + # http://www.postgresql.org/docs/current/static/server-shutdown.html + kill signal INT + # Give Postgres a decent amount of time to clean up after - # receiving Upstart's SIGTERM. + # receiving Upstart's SIGINT. kill timeout 60 ''; };