diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-03-23 21:06:52 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-04-08 18:29:23 +0100 |
commit | f41a9c330d16c546407d91e8a549e48154d967f7 (patch) | |
tree | b744bd5541fba8a171066e0e52bd48e595c4bafe /openstack/etc/systemd/system/postgres-server.service | |
parent | c6d832f7cf10e1f986a617735c1f2a59b26f751f (diff) | |
download | definitions-f41a9c330d16c546407d91e8a549e48154d967f7.tar.gz |
WIP: Add OpenStack initial configuration
TODO: Split this out into:
1. initial config (openstack/etc) default values
2+. as many individual changes to initial config as possible to extract,
including support scripts and configuration extensions
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 |