forked from devexp-db/postgresql-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postgresql.service.in
44 lines (35 loc) · 1.39 KB
/
postgresql.service.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# It's not recommended to modify this file in-place, because it will be
# overwritten during package upgrades. It is recommended to use systemd
# "dropin" feature; i.e. create file with suffix .conf under
# @systemduserunitsdir@/UNITNAME.service.d directory overriding the
# unit's defaults. Look at systemd.unit(5) manual page for more info.
[Unit]
Description=PostgreSQL database server
After=network.target
[Service]
Type=notify
User=postgres
Group=postgres
# 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
# Disable OOM kill on the postmaster
OOMScoreAdjust=-1000
# ... but allow it still to be effective for child processes
# (note that these settings are ignored by Postgres releases before 9.5)
Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj
Environment=PG_OOM_ADJUST_VALUE=0
@PGDATA_ENVIRONMENT@
ExecStartPre=@libexecdir@/postgresql-check-db-dir %N
# Even though the $PGDATA variable is exported (postmaster would accept that)
# use the -D option here so PGDATA content is printed by /bin/ps and by
# 'systemctl status'.
ExecStart=@SYSTEMD_EXECSTART@
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
# No artificial start/stop timeout (rhbz#1525477, pgrpms#2786).
TimeoutSec=0
[Install]
WantedBy=multi-user.target