2 Description=PostgreSQL database server
11 Environment=PGROOT=/var/lib/postgres
13 SyslogIdentifier=postgres
14 PIDFile=/var/lib/postgres/data/postmaster.pid
15 RuntimeDirectory=postgresql
16 RuntimeDirectoryMode=755
18 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data
19 ExecStart=/usr/bin/postgres -D ${PGROOT}/data
20 ExecReload=/bin/kill -HUP ${MAINPID}
24 # Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
25 # killing Postgres, so adjust it downward
28 # Additional security-related features
33 ProtectControlGroups=true
34 ProtectKernelModules=true
35 ProtectKernelTunables=true
37 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
38 RestrictNamespaces=true
40 SystemCallArchitectures=native
43 WantedBy=multi-user.target