postgresql.service-9.6-r1 (1477B)
1 # It's not recommended to modify this file in-place, because it will be
2 # overwritten during package upgrades. If you want to customize, the
3 # best way is to create file
4 # "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
5 # containing your changes
6
7 # For example, if you want to change the server's port number to 5433,
8 # create a file named
9 # "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
10 # containing:
11 # [Service]
12 # Environment=PGPORT=5433
13 # This will override the setting appearing below.
14
15 [Unit]
16 Description=PostgreSQL database server
17 After=network.target
18
19 [Service]
20 Type=notify
21
22 User=postgres
23 Group=postgres
24
25 # Port number for server to listen on
26 Environment=PGPORT=5432
27
28 # Location of configuration files
29 Environment=PGDATA=/etc/postgresql-@SLOT@
30
31 # Where the data directory is located
32 Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
33
34 # Where to send early-startup messages from the server (before the logging
35 # options of postgresql.conf take effect)
36 # This is normally controlled by the global default set by systemd
37 # StandardOutput=syslog
38
39 ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
40 ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres -p ${PGPORT} -D ${DATA_DIR}
41 ExecReload=/bin/kill -HUP $MAINPID
42 KillMode=mixed
43 KillSignal=SIGINT
44
45 # Give a reasonable amount of time for the server to start up/shut down
46 TimeoutSec=300
47
48 # Disable OOM kill on the postmaster
49 OOMScoreAdjust=-1000
50
51 [Install]
52 WantedBy=multi-user.target