Re: duplicate connection failure messages

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: duplicate connection failure messages
Date: 2010-11-12 01:54:17
Message-ID: 201011120154.oAC1sHa22085@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> On tor, 2010-10-14 at 07:30 +0200, Magnus Hagander wrote:
> > And I agree it's not very friendly in this specific case - I
> > wonder if we should log it as "localhost (127.0.0.1) and "localhost
> > (::1)" (and similar for any other case that returns more than one
> > address).
>
> That looks good.

I have developed the attached patch to report whether IPv4 or IPv6 are
being used. I could not find the numeric value as alwasy populated, and
this seems clearer too:

$ pql -h localhost test
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (IPv4) 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" (IPv4) and accepting
TCP/IP connections on port 5432?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/pgpatches/libpq_ipv6 text/x-diff 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2010-11-12 02:31:51 locales and encodings Oh MY!
Previous Message Itagaki Takahiro 2010-11-12 01:36:34 Re: MULTISET and additional functions for ARRAY