[9.1] pg_stat_get_backend_server_addr

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [9.1] pg_stat_get_backend_server_addr
Date: 2010-05-27 19:32:25
Message-ID: 1274988745.18581.36.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
get-server-addr.patch text/x-patch 8.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-05-27 19:35:07 Re: JSON manipulation functions
Previous Message David Fetter 2010-05-27 19:30:10 Re: Specification for Trusted PLs?