0

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!).

Edit:

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.

Edit 2:

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.

8
  • 1
    Any clue in the logfiles? Is there disk space available on the disk with the database files (or logfiles)?
    – Marco
    Commented Dec 9, 2015 at 10:04
  • 1
    So what happened when you restarted the Postgres (Windows) service?
    – user1822
    Commented Dec 9, 2015 at 10:42
  • 1
    "received fast shutdown request" means Postgres was properly shut down, e.g. because someone stopped the Windows service or "pg_ctl stop" was called.
    – user1822
    Commented Dec 9, 2015 at 11:13
  • Thanks dezso, merged with my old account. I am trying to restart the windows service but its not working.
    – Hanmill
    Commented Dec 9, 2015 at 11:24
  • After the unsuccessful start attempt, does something new appear in the logs? Commented Dec 9, 2015 at 12:56

1 Answer 1

0

This problem was resolved with the following actions:

Postgres 9.3. was uninstalled

Postgres was re-installed with a different data directory

The postgresql-x64-9.3 service was now running.

I stopped postgresql-x64-9.3

Then I cleaned out all the folders in the new data directory (I kept the new config files, in case they were the source of my problem).

I copied across my old data directory files (as per https://stackoverflow.com/questions/3305961/recover-postgresql-databases-from-raw-physical-files)

I restarted postgresql-x64-9.3

The old databases were now working

Thanks everyone for your suggestions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.