I have been running Postgres 9.3 continuously for days on a windows 7 machine with no problems. This morning I came in to see that Postgres, and every application using my postgres database had crashed. I had been running an Java program in Eclipse that I have run many thousands of times in the past with no problems, the program makes new tables based on other tables in the database, my log suggests the program ran ok and produced its result as normal.
Now when I try and start the server from Pgadmin I get the server doesn't listen error message. How can I get the server running again, or if that's not possible recover my data? there are many important tables in the database and restoring them from the backup will be a real pain! (especially if this is going to happen again!).
The log file says:
2015-12-09 03:22:44 GMT LOG: could not receive data from client: No connection could be made because the target machine actively refused it. 2015-12-09 03:22:44 GMT LOG: could not receive data from client: No connection could be made because the target machine actively refused it. 2015-12-09 03:23:08 GMT LOG: received fast shutdown request 2015-12-09 03:23:08 GMT LOG: aborting any active transactions 2015-12-09 03:23:08 GMT LOG: autovacuum launcher shutting down 2015-12-09 03:23:08 GMT LOG: shutting down 2015-12-09 03:23:09 GMT LOG: database system is shut down
I tried stopping antivirus and disabling my firewall, neither helped, nor did updating postgres.
I have found that the postgresql-x64-9.3 service is listed as "stopped" in task manager. I have tried going to the services menu and restarting it. I get the following message:
The postgresql-x64-9.3 - PostgresSQL Server 9.3 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.