summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mayo <aklhfex@gmail.com>2017-05-15 19:51:11 +0100
committerPatrice Clement <monsieurp@gentoo.org>2017-05-31 18:47:32 +0200
commitc5244125f049f0de1b4055169ea2c37958c612a4 (patch)
treefc9bd954894c06f720a1e2b85b5812413c677154 /dev-db/postgresql/files
parentwww-apps/otrs: version bump to 5.0.19. (diff)
downloadgentoo-c5244125f049f0de1b4055169ea2c37958c612a4.tar.gz
gentoo-c5244125f049f0de1b4055169ea2c37958c612a4.tar.bz2
gentoo-c5244125f049f0de1b4055169ea2c37958c612a4.zip
dev-db/postgresql: change systemd unit type to notify.
Add systemd USE flag to control required configure option and dependency. Default events that used to be written to postmaster.log will now be written to the location specified by DefaultStandardOutput and DefaultStandardError in system.conf. Package-Manager: Portage-2.3.5, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/4557
Diffstat (limited to 'dev-db/postgresql/files')
-rw-r--r--dev-db/postgresql/files/postgresql.service-9.656
1 files changed, 56 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/postgresql.service-9.6 b/dev-db/postgresql/files/postgresql.service-9.6
new file mode 100644
index 000000000000..89ec2d5cf7c0
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.service-9.6
@@ -0,0 +1,56 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change the server's port number to 5433,
+# create a file named
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
+# containing:
+# [Service]
+# Environment=PGPORT=5433
+# This will override the setting appearing below.
+
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=notify
+
+User=postgres
+Group=postgres
+
+# Port number for server to listen on
+Environment=PGPORT=5432
+
+# Location of configuration files
+Environment=PGDATA=/etc/postgresql-@SLOT@
+
+# Where the data directory is located
+Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
+
+# Where to send early-startup messages from the server (before the logging
+# options of postgresql.conf take effect)
+# This is normally controlled by the global default set by systemd
+# StandardOutput=syslog
+
+ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
+ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres -p ${PGPORT} -D ${DATA_DIR}
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=mixed
+KillSignal=SIGINT
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Disable OOM kill on the postmaster
+OOMScoreAdjust=-1000
+
+# Make sure the required runtimedir is present
+RuntimeDirectory=postgresql
+RuntimeDirectoryMode=1775
+
+[Install]
+WantedBy=multi-user.target