summaryrefslogtreecommitdiffstats
path: root/postgresql.service.in
diff options
context:
space:
mode:
Diffstat (limited to 'postgresql.service.in')
-rw-r--r--postgresql.service.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/postgresql.service.in b/postgresql.service.in
index 4b9fc95..ace3ebb 100644
--- a/postgresql.service.in
+++ b/postgresql.service.in
@@ -1,7 +1,8 @@
# It's not recommended to modify this file in-place, because it will be
-# overwritten during package upgrades. If you want to customize, the
-# best way is to edit configuration file /etc/postgresql/$SERVICE_NAME
-# (where by default, SERVICE_NAME is postgresql).
+# overwritten during package upgrades. It is recommended to use systemd
+# "dropin" feature; i.e. create file with suffix .conf under
+# @userunitsdir@/UNITNAME.service.d directory overriding the
+# unit's defaults. Look at systemd.unit(5) manual page for more info.
[Unit]
Description=PostgreSQL database server
@@ -13,8 +14,6 @@ Type=forking
User=postgres
Group=postgres
-EnvironmentFile=-@PKGCONFIG_DIR@/%N
-
# Where to send early-startup messages from the server (before the logging
# options of postgresql.conf take effect)
# This is normally controlled by the global default set by systemd
@@ -27,6 +26,8 @@ OOMScoreAdjust=-1000
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0
+Environment=PGDATA=@PGDATADIR@
+
ExecStartPre=@libexecdir@/postgresql-check-db-dir %N
# Temporarily use postgresql-ctl wrapper around pg_ctl until there will