Re: strange problem with ip6 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: strange problem with ip6
Date
Msg-id 29538.1179417662@sss.pgh.pa.us
Whole thread Raw
In response to Re: strange problem with ip6  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: strange problem with ip6  (Christian Kratzer <ck-lists@cksoft.de>)
List pgsql-bugs
Andrew Sullivan <ajs@crankycanuck.ca> writes:
> On Mon, May 14, 2007 at 08:32:21PM -0600, Brian Hirt wrote:
>> I have postgresql installed on a mac, and I'm connecting from another
>> mac on the network using ip6.   When I  try to select out of
>> pg_stat_activity i get this error.  I suspect the %en0 has something
>> to do with the problem, but I'm no IP6 expert.

> That would indeed be a problem.  "%" is not a valid character in an
> IPv6 text representation of the address (see RFC 4291,
> <http://www.rfc-editor.org/cgi-bin/rfcdoctype.pl?loc=RFC&letsgo=4291&type=ftp&file_format=txt>).
> Whether this is a bug for postgres seems to depend on whether that
> reading is coming from the OS or postgres itself.

I enabled IPv6 on my laptop (maybe I did it wrong, dunno) and noted that
%en1 and %lo0 and similar notations were appended to some but not all of
the IPv6 addresses output by "netstat -r -n".  Furthermore it seemed
that adding or not adding these notations to IPv6 addresses given to
psql's -h switch affected whether I could connect or not.  I didn't see
a case where the %-thingy showed up in getnameinfo() output within
Postgres, as is apparently happening for Brian; but it sure looked like
it was happening to netstat.  So Apple is doing something mighty
nonstandard here :-(.  I ran out of time/interest to probe deeper.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: strange problem with ip6
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #3266: SSL broken pipes kill the machine and fill the disk