Re: duplicate connection failure messages

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: duplicate connection failure messages
Date: 2010-11-26 14:06:24
Message-ID: 1290780384.5294.3.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On lör, 2010-11-20 at 18:07 -0500, Bruce Momjian wrote:
> The output is as expected:
>
> $ psql -h localhost test
> psql: could not connect to server: Connection refused
> Is the server running on host "localhost" (127.0.0.1) and accepting
> TCP/IP connections on port 5432?
> $ psql -h 127.0.0.1 test
> 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 5432?

Thanks for working on this. However, the example I posted at the
beginning of this thread now does this:

$ ./psql -p 55555 -h localhost
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (???) and accepting
TCP/IP connections on port 55555?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 55555?

The "???" should presumably be "::1".

Also, this comment should be updated:

/*
* Try to initiate a connection to one of the addresses
* returned by pg_getaddrinfo_all(). conn->addr_cur is the
* next one to try. We fail when we run out of addresses
* (reporting the error returned for the *last* alternative,
* which may not be what users expect :-().
*/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-11-26 14:52:30 Re: duplicate connection failure messages
Previous Message Florian Pflug 2010-11-26 13:48:39 Re: improving foreign key locks