Re: [9.1] pg_stat_get_backend_server_addr - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [9.1] pg_stat_get_backend_server_addr
Date
Msg-id 201005281341.o4SDfOo04222@momjian.us
Whole thread Raw
In response to Re: [9.1] pg_stat_get_backend_server_addr  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [9.1] pg_stat_get_backend_server_addr
List pgsql-hackers
Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > 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,
> 
> ... indeed.  Is it worth burdening the pg_stats mechanism with this?
> The use case seems vanishingly thin.

I am confused how this is different from inet_server_addr() and
inet_server_port().  

Also, these functions return nothing for unix domain connections. 
Should they, particularly for the port number which we do use to map to
a socket name?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: functional call named notation clashes with SQL feature
Next
From: Tom Lane
Date:
Subject: Re: Working with PostgreSQL enums in C code