summarylogtreecommitdiffstats
path: root/postgresql.service
diff options
context:
space:
mode:
authorkreon2015-08-29 03:36:52 +0300
committerkreon2015-08-29 03:36:52 +0300
commita4220005a370089e1711eaa96be40a7d53d14bc0 (patch)
tree361a59c18a205e1e7740291c3ce2d1bec3477792 /postgresql.service
downloadaur-a4220005a370089e1711eaa96be40a7d53d14bc0.tar.gz
initial release
Diffstat (limited to 'postgresql.service')
-rw-r--r--postgresql.service27
1 files changed, 27 insertions, 0 deletions
diff --git a/postgresql.service b/postgresql.service
new file mode 100644
index 000000000000..76f6dd2f499e
--- /dev/null
+++ b/postgresql.service
@@ -0,0 +1,27 @@
+[Unit]
+Description=PostgreSQL-1C database server
+After=network.target
+
+[Service]
+Type=forking
+TimeoutSec=120
+User=postgres
+Group=postgres
+
+Environment=PGROOT=/var/lib/postgres
+
+SyslogIdentifier=postgres
+PIDFile=/var/lib/postgres/postmaster.pid
+
+#ExecStartPre=/usr/bin/bin/postgresql-check-db-dir ${PGROOT}/data
+ExecStart=/usr/bin/pg_ctl -D ${PGROOT}/data start
+ExecReload=/usr/bin/pg_ctl -D ${PGROOT}/data reload
+ExecStop=/usr/bin/pg_ctl -D ${PGROOT}/data stop
+
+# 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
+