Page 1 of 1

Re: Deadlock in postgresql

Posted: Wed May 04, 2016 1:09 pm
by tgriep
There may be a stuck Nagios process that is holding the postgres database causing the deadlock error.

Lets stop the Nagios and postgres daemons by logging to the server as root and running the following

Code: Select all

service nagios stop
killall -9 nagios
service postgresql stop
Next, lets start the postgres database and vacuum it by running the following.

Code: Select all

service postgresql start
echo "vacuum;vacuum analyze;vacuum full;"|psql nagiosxi postgres
service postgresql restart
Now startup the Nagios daemon and see if that resolved the issue.

Code: Select all

service nagios start