[9.1] pg_stat_get_backend_server_addr - Mailing list pgsql-hackers

From Peter Eisentraut
Subject [9.1] pg_stat_get_backend_server_addr
Date
Msg-id 1274988745.18581.36.camel@vanquo.pezone.net
Whole thread Raw
Responses Re: [9.1] pg_stat_get_backend_server_addr
Re: [9.1] pg_stat_get_backend_server_addr
List pgsql-hackers
There are functions pg_stat_get_backend_client_addr and
pg_stat_get_backend_client_port, which are exposed through the
pg_stat_activity view, but there is no straightforward way to get the
server-side address and port of a connection.  This is obviously much
less commonly needed than the client information, but it's still
sometimes useful on hosts with many IP addresses.

I suggest that we add the functions pg_stat_get_backend_server_addr and
pg_stat_get_backend_server_port, but don't expose them in
pg_stat_activity.  (_server_port is really mostly for symmetry, because
you can't currently bind to multiple ports.)

Patch attached.  Comments?


Attachment

pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Specification for Trusted PLs?
Next
From: Tom Lane
Date:
Subject: Re: JSON manipulation functions