summarylogtreecommitdiffstats
path: root/postgresql.service
diff options
context:
space:
mode:
Diffstat (limited to 'postgresql.service')
-rw-r--r--postgresql.service9
1 files changed, 4 insertions, 5 deletions
diff --git a/postgresql.service b/postgresql.service
index 3981058622dd..37fcae996352 100644
--- a/postgresql.service
+++ b/postgresql.service
@@ -3,7 +3,7 @@ Description=PostgreSQL database server
After=network.target
[Service]
-Type=notify
+Type=forking
TimeoutSec=120
User=postgres
Group=postgres
@@ -16,10 +16,9 @@ RuntimeDirectory=postgresql
RuntimeDirectoryMode=755
ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
-ExecStart=/usr/bin/postgres -D ${PGROOT}/data
-ExecReload=/bin/kill -HUP ${MAINPID}
-KillMode=mixed
-KillSignal=SIGINT
+ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT}/data start -w -t 120
+ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT}/data reload
+ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres, so adjust it downward