Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have tried to install a postgres on my windows Vista, but I cannot seem to get it to work.

I download PGAdmin tools and when i try to connect to localhost it tells me the generic thing that the connection was refused.

I enabled listen on all ip addresses, and local authentication set to 'trust'

I am not sure how to check if the server is actually running the user name is still postgres even on windows I assume.

I have no clue what tool i can use or what process I should look for.

There is postgresql-9.1 service, which is not running, and when I try to start it, it tells me "The postgresql-9.1 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs."

I am out of ideas, can anyone help?

PS. below is my pg_hba file

#IPv4 local connections:
host     all     all     192.168.0.1/16  trust
#IPv6 local connections:
host     all     all     *   trust
host     all     postgres    192.168.0.1/16  md5
host     all     postgres    ::1/128     md5
local    all     all     trust

PPS. this is what the error log says:

011-11-20 21:58:07 EST LOG:  local connections are not supported by this build
2011-11-20 21:58:07 EST CONTEXT:  line 87 of configuration file "C:/Program Files/PostgreSQL/9.1/data/pg_hba.conf"
2011-11-20 21:58:07 EST FATAL:  could not load pg_hba.conf
share|improve this question

migrated from stackoverflow.com Nov 21 '11 at 13:57

This question came from our site for professional and enthusiast programmers.

    
Anything interesting noted in the data/pg_log folder? –  phatfingers Nov 21 '11 at 3:21
    
oh wow, @phatfingers yeah.. it seems something very interesting 2011-11-20 21:58:07 EST LOG: local connections are not supported by this build 2011-11-20 21:58:07 EST CONTEXT: line 87 of configuration file "C:/Program Files/PostgreSQL/9.1/data/pg_hba.conf" 2011-11-20 21:58:07 EST FATAL: could not load pg_hba.conf why are local connections not supported? and why would it not be able to load pg_hba file? –  StanQA Nov 21 '11 at 11:32

2 Answers 2

up vote 2 down vote accepted

At a guess, you should look at line 87 (like the error message says) and you'll probably find that's the "local all all" line. As the error message tells you "local" connections are not supported.

The "local" connection type is for unix sockets, not tcp sockets, and Windows doesn't support them.

share|improve this answer
    
Would that line (I will have to check back home for this later tonight) be responsible for not being able to load the pg_hba file? or is that a different problem? –  StanM Nov 21 '11 at 14:09

PostgreSQL used to silently tolerate that line in pg_hba.

http://www.postgresql.org/docs/9.1/interactive/release-9-1.html#AEN106700

If you're looking to have local password-less connections, you could do this.

host    all    all    127.0.0.1/32   trust
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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