A windows 7 machine running a Postgres 8.4.x server stopped working properly this morning. The errors are more than strange:
- The service is not running, according to the services control panel.
- Astonishingly, the server is actually running, because we can connect with both pgAdmin and our own ODBC-based software, but some queries crash (that's how we found out it's broken).
- Neither starting not stopping the server does anything, and both return with errors, either failure to access the data directory, or just no useful error at all (net helpmsg gives me exactly nothing).
Event-Viewer, most of these are there multiple times, and happen when booting or trying to start/stop the server.
PostgreSQL - Error - Se agotó el tiempo de espera al inicio del servidor
2013-12-03 21:33:32 GMT FATAL: el archivo de bloqueo «postmaster.pid» ya existe
2013-12-03 21:33:32 GMT HINT: ¿Hay otro postmaster (PID 2952) corriendo en el directorio de datos «C:/Program Files (x86)/PostgreSQL/8.4/data»?
pg_ctl: no se pudo encontrar el ejecutable postgres
2013-12-03 18:46:34 CET FATAL: no se pudo crear ningún socket TCP/IP
pg_dump
is able to pull a complete backup (so I did that before messing around), despite the service still not marked as running.
I've tried deleting the pid-file, as that's something I find recommended everywhere, but that didn't help.
Going through the log-files actually found a real error in a query, but that still does not solve the issue that I cannot stop or start the postgres service. Edit: And fixing that invalid query doesn't solve anything, the application still crashes.
Relevant parts of the pg_hba.conf:
host all all 127.0.0.1/32 md5
host all all 192.168.0.0/16 md5
host all all fe80::/48 md5
Some logs (the others have the equivalent content):
http://pastebin.com/v9gtiDmJ
http://pastebin.com/wxYr8TUM