diff options
author | banzay | 2017-10-09 01:18:47 +0300 |
---|---|---|
committer | banzay | 2017-10-09 01:18:47 +0300 |
commit | f002a0e2dfb2ec7bcd992440b47dc1af1d2f832e (patch) | |
tree | da923a50484870971a2f2966f122efa34f6e389b /postgresql.service | |
parent | da68a5ca3893c50fdcdb9b073a1f223affd03964 (diff) | |
download | aur-f002a0e2dfb2ec7bcd992440b47dc1af1d2f832e.tar.gz |
package update
Diffstat (limited to 'postgresql.service')
-rw-r--r-- | postgresql.service | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/postgresql.service b/postgresql.service index f2eaa51f4eb7..68742b6b0bea 100644 --- a/postgresql.service +++ b/postgresql.service @@ -1,9 +1,9 @@ [Unit] -Description=PostgreSQL-1C database server +Description=PostgreSQL database server After=network.target [Service] -Type=simple +Type=forking TimeoutSec=120 User=postgres Group=postgres @@ -11,11 +11,25 @@ Group=postgres Environment=PGROOT=/var/lib/postgres SyslogIdentifier=postgres -PIDFile=/var/lib/postgres/postmaster.pid -ExecStart=/usr/bin/postgres -D ${PGROOT}/data -PrivateTmp=yes +PIDFile=/var/lib/postgres/data/postmaster.pid +RuntimeDirectory=postgresql +RuntimeDirectoryMode=755 + +ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data +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 OOMScoreAdjust=-200 +# Additional security-related features +PrivateTmp=true +ProtectHome=true +ProtectSystem=full +NoNewPrivileges=true + [Install] WantedBy=multi-user.target |