# tar xzf xi-latest.tar.gz
# cd nagiosxi/
# ./upgrade
Checking PostgresQL status...
PostgresQL running - continuing...
Creating audit log database structure...
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#
Did you update the postgresql credentials for the nagiosxi user, or put any special firewall rules in place that might explain the connection refusal? It's say that it can't connect to the local postgresql socket.