Re: jdbc pg_hba.conf error - Mailing list pgsql-general

From gonzales@linuxlouis.net
Subject Re: jdbc pg_hba.conf error
Date
Msg-id Pine.LNX.4.64.0705311019020.32407@mx1.linuxlouis.net
Whole thread Raw
In response to Re: jdbc pg_hba.conf error  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-general
W/out specifying a -h switch, postgres defaults to using a UNIX domain
socket, meaning AF_UNIX and not AF_INET.  There is a big difference.
Using -h 127.0.0.1 is the localhost not necessarily 'local' from the
context of postgres.  W/out looking into the details, I think 'local' is
referring to AF_UNIX.  In other words, without specyfing the -h switch,
when you have connected, do a "netstat -an" you'll see there are no
TCP/IP(AF_INET) sockets connected, but rather there is a AF_UNIX socket
connected which will be somewhere in /tmp/blah.s.psostgres.5000 or
something similar.



On Thu, 31 May 2007, Oliver Elphick wrote:

> On Thu, 2007-05-31 at 09:38 -0400, Bhavana.Rakesh wrote:
>> Hi,
>> Here's what happens when I specify the port number
>>
>> [brakesh@lnx383 ~]$ psql -U brakesh -p 5000 -h 127.0.0.1 -d testing123
>> psql: could not connect to server: Connection refused
>>         Is the server running on host "127.0.0.1" and accepting
>>         TCP/IP connections on port 5000?
>
> Since that command without "-h 127.0.0.1" does work, the clear
> implication is that somehow there is a postmaster listening on port 5000
> to Unix sockets and a different postmaster, presumably with a different
> pg_hba.conf, listening on port 5432 on 127.0.0.1.
>
>
>

--
Louis Gonzales
louis.gonzales@linuxlouis.net
http://www.linuxlouis.net


pgsql-general by date:

Previous
From: Ray Stell
Date:
Subject: Re: jdbc pg_hba.conf error
Next
From: Tom Lane
Date:
Subject: Re: warm standby server stops doing checkpoints after a while