Make sure that no Postgres processes are running using the command:ps auxw | grep post
If any of them are running, kill them.

Remove Postgres' pid file:rm -f PGSQL_HOME/data/postmaster.pid
From now on, we note PGSQL_HOME as the Postgres home directory
which is /var/lib/pgsql on RedHat servers, and
/usr/local/pgsql on FreeBSD.