Re: duplicate connection failure messages

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: duplicate connection failure messages
Date: 2010-11-13 13:35:54
Message-ID: AANLkTimCc_1oodefPYseaRP=Kw5EUGL6vBKb1iSn9mQ1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 12, 2010 at 15:02, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Tom Lane wrote:
>> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> > I have developed the attached patch to report whether IPv4 or IPv6 are
>> > being used.
>>
>> What's the use of that exactly?  It doesn't really respond to Peter's
>> concern, I think.
>
> Peter liked:
>
>> 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).
>
> What this will show is:
>
>        localhost (IPv4)
>        localhost (IPv6)
>
> Is that good?  I can't figure out how to do ::1 because when you supply
> a host _name_, there is no reverse mapping done.  Looking at the code,
> we test for a host name, then a host ip, and don't assume they are both
> set.

The address is in conn->raddr, no? When you've put in a host name, we
do a forward lookup, so conn->raddr should contain ::1 already? You
only need the reverse mapping to get the "localhost" part, if I read
the code correctly?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-11-13 13:41:35 Re: wCTE behaviour
Previous Message Yeb Havinga 2010-11-13 13:28:35 Re: wCTE behaviour