I have a couple development servers I have been using for testing PostgreSQL configured with walmgr for log shipping. The secondary server stopped working the other day and I finally got a chance to look into it this morning and attempted to restart Postgres via a terminal but it failed. Below I describe how the error was noticed, what was done to troubleshoot PSQL not starting, and what was done to resolve the problem so PostgreSQL would start without issue.
On a recent installation of PostgreSQL on CentOS Linux I had some issues after making some configuration changes. I have a basic template of changes I make to Postgres after initial installation and then I restart the PostgreSQL server. This time when restarting Postgres it failed as shown below.
LOG: could not translate host name “localhost”, service “5432” to address: Name or service not known
I recently installed PostgreSQL on an Amazon Web Services CentOS instance however when I first attempted to start Postgres I received an error that I had never seen before. The pgstartup.log file located in /var/lib/pgsql contained the below data.