Skip to content

Fix PostgreSQL

After installing a patch for CentOS (as simple as running yum update), when there is a fix for PostgreSQL, the PostgreSQL service script needs to be changed back to using the custom data directory. * Edit /etc/systemd/system/multi-user.target.wants/postgresql-9.4.service

Replace

Environment=PGDATA=/var/lib/pgsql/9.4/data/

with

Environment=PGDATA=/opt/pgsql/9.4/data/
  • Run
systemctl daemon-reload
  • Run
systemctl restart postgresql-9.4.service