PostgreSQL service doesn't start on Windows 7
- by Mehrdad
(Not sure if this should be on Stack Overflow or Super User... please move if needed.)
When I start the PostgreSQL service on Windows 7 x64, it immediately stops.
When I check my log folder (C:\PostgreSQL\9.1\data\pg_log\), I see new but empty log files.
The Event Viewer doesn't tell me anything other than the fact that the server did not respond.
I've even tried turning off my firewall (I don't have any antivirus or anything else), but nothing helps.
The setup works fine when I'm on Windows XP (32-bit) (same computer, different partition). I can't figure out what's wrong, even though I've tried tracing the system calls.
Is PostgreSQL compatible with Windows 7 x64 at all? Any ideas what the issue might be?
More info:
This problem also happens at the end of installation -- the service starts, then stops immediately, before the installer can do anything.
Installation log:
Starting the database server...
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\9.1\installer\server\startserver.vbs" postgresql-x64-9.1
Script exit code: 0
Script output:
Starting postgresql-x64-9.1
Service postgresql-x64-9.1 started successfully // <==== NOT REALLY!! It stops!
startserver.vbs ran to completion
Script stderr:
Loading additional SQL modules...
Executing cscript //NoLogo "C:\Program Files\PostgreSQL\9.1\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files\PostgreSQL\9.1" "C:\Program Files\PostgreSQL\9.1\data" 5432
Script exit code: 2
Script output:
Installing the adminpack module in the postgres database...
Executing 'C:\Users\HOMEUS~1\AppData\Local\Temp\rad6C20D.bat'...
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
Failed to install the 'adminpack' module in the 'postgres' database
loadmodules.vbs ran to completion
Script stderr:
Program ended with an error exit code
Error running cscript //NoLogo "C:\Program Files\PostgreSQL\9.1\installer\server\loadmodules.vbs" "postgres" "****" "C:\Program Files\PostgreSQL\9.1" "C:\Program Files\PostgreSQL\9.1\data" 5432 : Program ended with an error exit code