## **************************************************************************
## For copyright and licensing terms, see the file named COPYING.
## **************************************************************************

[Unit]
Description=PostgreSQL database server
Before=databases.target

[Service]
User=postgres
SessionLeader=yes
ExecStart=/usr/lib/%p/bin/postmaster -D ${data:-%S/postgres/data} ${flags}
Restart=no
# The Linux OOM Killer tends to pick on PostgreSQL because the main process has so much shared memory shared with its worker children.
# This is not desirable in PostgreSQL shops; so we tell Linux not to account for 5/8 of its memory score.
OOMScoreAdjust=-625

[Install]
WantedBy=server.target
