postgresql: Enable systemd integration for 9.6+

This allows, finally, proper detection when postgresql is ready to
accept connections. Until now, it was possible that services depending
on postgresql would fail in a race condition trying to connect
to postgresql.
This commit is contained in:
Domen Kožar
2018-11-27 19:16:21 +00:00
parent b3fb2d5c1c
commit d04fedd715
2 changed files with 7 additions and 2 deletions

View File

@@ -238,6 +238,9 @@ in
User = "postgres";
Group = "postgres";
PermissionsStartOnly = true;
Type = if lib.versionAtLeast cfg.package.version "9.6"
then "notify"
else "simple";
# Shut down Postgres using SIGINT ("Fast Shutdown mode"). See
# http://www.postgresql.org/docs/current/static/server-shutdown.html