diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-02-12 17:26:00 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-02-12 17:26:00 +0000 |
commit | 88c8c3fc93c6b7c3b2f5e54dd19d5a84ae126626 (patch) | |
tree | 97076d768900b0f1f0361efd899ac75cf0937c6c /openstack/etc/systemd/system/postgres-server.service | |
parent | 1319309d3ff4eb85cb0e7e6cb178cb56ff116524 (diff) | |
download | definitions-88c8c3fc93c6b7c3b2f5e54dd19d5a84ae126626.tar.gz |
SPLITME: Add all Openstackbaserock/franred/only-openstack-packages
Diffstat (limited to 'openstack/etc/systemd/system/postgres-server.service')
-rw-r--r-- | openstack/etc/systemd/system/postgres-server.service | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openstack/etc/systemd/system/postgres-server.service b/openstack/etc/systemd/system/postgres-server.service new file mode 100644 index 00000000..6ee25e98 --- /dev/null +++ b/openstack/etc/systemd/system/postgres-server.service @@ -0,0 +1,26 @@ +[Unit] +Description=PostgreSQL database server +Requires=postgres-setup.service +After=postgres-setup.service + +[Service] +Type=forking +TimeoutSec=120 +User=postgres +Group=postgres + +Environment=PGROOT=/var/lib/pgsql + +SyslogIdentifier=postgres +PIDFile=/var/lib/pgsql/data/postmaster.pid + +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 + +[Install] +WantedBy=multi-user.target |