You should read these troubleshooting tips if you receive an error while troubleshooting your Postgresql installation.
Approved: Fortect
pid file. PostgreSQL creates a file named postmaster. pid in the data directory to store the process ID of the PostgreSQL server. If PostgreSQL crashes, this instruction file may contain the classic PID, which confuses PostgreSQL. The way to fix this problem is to remove postmaster unambiguously.