diff options
author | root <root@rshg054.dnsready.net> | 2012-08-19 00:04:07 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-08-19 00:04:07 +0000 |
commit | c512f9eb344575ac6bce0b13729c05e1760cd094 (patch) | |
tree | 8d60a9bd559a941bba52a67170900c159d2024eb /testing/postgresql/postgresql.service | |
parent | 948da5eabcbf8d74270e661d0730ba1c203913f5 (diff) |
Sun Aug 19 00:04:07 UTC 2012
Diffstat (limited to 'testing/postgresql/postgresql.service')
-rw-r--r-- | testing/postgresql/postgresql.service | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/postgresql/postgresql.service b/testing/postgresql/postgresql.service new file mode 100644 index 000000000..2fcd3e93d --- /dev/null +++ b/testing/postgresql/postgresql.service @@ -0,0 +1,20 @@ +[Unit] +Description=PostgreSQL database server + +[Service] +Type=forking +SyslogIdentifier=postgres +PIDFile=/var/lib/postgres/data/postmaster.pid + +# initdb script takes care for symlinking $PGROOT to /var/lib/postgres +ExecStartPre=/usr/lib/systemd/scripts/postgresql-initdb +ExecStart= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgres/data start" +ExecReload=/bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgres/data reload" +ExecStop= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D /var/lib/postgres/data stop -m fast" + +# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in +# killing Postgres +OOMScoreAdjust=-200 + +[Install] +WantedBy=multi-user.target |