From: | gonzales(at)linuxlouis(dot)net |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | "Bhavana(dot)Rakesh" <Bhavana(dot)Rakesh(at)noaa(dot)gov>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: jdbc pg_hba.conf error |
Date: | 2007-05-31 14:26:20 |
Message-ID: | Pine.LNX.4.64.0705311019020.32407@mx1.linuxlouis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)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(dot)gonzales(at)linuxlouis(dot)net
http://www.linuxlouis.net
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-31 14:27:35 | Re: stable functions |
Previous Message | Tom Lane | 2007-05-31 14:23:40 | Re: warm standby server stops doing checkpoints after a while |