Friday, October 11, 2013

Error while starting PostgreSQL with Windows OS : pg_ctl: invalid data in PID file ""

while start PostgreSQL on windows OS, 

C:>"C:/Program Files/PostgreSQL/8.3/bin/pg_ctl.exe-D "C:/ProgramFiles/PostgreSQL/8.3/data" start


pg_ctl: invalid data in PID file "C:/ProgramFiles/PostgreSQL/8.3/data/"
pg_ctl: invalid data in PID file "/postgres/directory/"


Just manually remove  the file at /postgres/directory/ and start it again, now PostgreSQL server will start successfully.  

Why this cause - Explanation was the process ID file for PostgreSQL, which indicate PostgreSQL process. If the file exists, it would mean that PostgreSQL is alive and running. If it doesn't, it would mean PostgreSQL have been terminated, either on purpose or abnormally.

In our case, the file exist but the
PostgreSQL instance is not running. i'm just looking up the file, it was empty but showing size as 1KB, no indication of process ID describe the process. this end of with the conclusion of PostgreSQL have been terminated abnormally, leaving an empty

No comments: