pgsql: Temporary fix for the problem that pg_stat_activity, - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Temporary fix for the problem that pg_stat_activity,
Date
Msg-id 20070517233159.9BD0F9FBFB2@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Temporary fix for the problem that pg_stat_activity, inet_client_addr(),
and inet_server_addr() fail if the client connected over a "scoped" IPv6
address.  In this case getnameinfo() will return a string ending with
a poorly-standardized "%something" zone specifier, which these functions
try to feed to network_in(), which won't take it.  So that we don't lose
functionality altogether, suppress the zone specifier before giving the
string to network_in().  Per report from Brian Hirt.

TODO: probably someday the inet type should support scoped IPv6 addresses,
and then this patch should be reverted.

Backpatch to 8.2 ... is it worth going further?

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        network.c (r1.66 -> r1.66.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/network.c.diff?r1=1.66&r2=1.66.2.1)
        pgstatfuncs.c (r1.34 -> r1.34.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/pgstatfuncs.c.diff?r1=1.34&r2=1.34.2.1)
    pgsql/src/include/utils:
        builtins.h (r1.282.2.1 -> r1.282.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h.diff?r1=1.282.2.1&r2=1.282.2.2)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Temporary fix for the problem that pg_stat_activity,
Next
From: momjian@postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: dded to TODO: > > * Support scoped IPv6 addresses > >