Skip to content

@0x1997 /postgresql.service
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
postgresql.service
[Unit]
Description=PostgreSQL database server
[Service]
Type=forking
Environment=PGROOT=/var/lib/postgres
SyslogIdentifier=postgres
PIDFile=/var/lib/postgres/data/postmaster.pid
# initdb script takes care for symlinking $PGROOT to /var/lib/postgres
ExecStartPre=/usr/lib/systemd/scripts/postgresql-initdb
ExecStart= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D ${PGROOT}/data start"
ExecReload=/bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D ${PGROOT}/data reload"
ExecStop= /bin/su - postgres -m -c "/usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast"
# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
# killing Postgres
OOMScoreAdjust=-200
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.