From 18f2d75275ed6167b250c0513e21e14432e5cfe0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 6 Nov 2009 22:56:47 +0000 Subject: [PATCH] * Set a timezone in the PostgreSQL job. Otherwise database initialisation will be incredibly slow (minutes instead of seconds). An strace shows that it's continuously looking up timezone information if TZ is empty. svn path=/nixos/branches/upstart-0.6/; revision=18235 --- modules/services/databases/postgresql.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/services/databases/postgresql.nix b/modules/services/databases/postgresql.nix index 92e6083d948..9f1ca6e2ed1 100644 --- a/modules/services/databases/postgresql.nix +++ b/modules/services/databases/postgresql.nix @@ -118,6 +118,8 @@ in startOn = "started ${startDependency}"; + environment = { TZ = config.time.timeZone; }; + preStart = '' if ! test -e ${cfg.dataDir}; then