[GENERAL] Finding IP of front end

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[GENERAL] Finding IP of front end

Kelly Burkhart
Is there a way to query for the IP address (or other attributes) of the
front-end process attached to a given backend?  Perhaps something
similar to:

pg_stat_get_frontend_*( backendid )

-K

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Reply | Threaded
Open this post in threaded view
|

Re: [GENERAL] Finding IP of front end

Steve Crawford
On Friday 20 May 2005 8:39 am, Kelly Burkhart wrote:
> Is there a way to query for the IP address (or other attributes) of
> the front-end process attached to a given backend?  Perhaps
> something similar to:
>
> pg_stat_get_frontend_*( backendid )

See the developer todo list
(http://www.postgresql.org/docs/faqs.TODO.html) onto which was
recently added "Add the client IP address and port to
pg_stat_activity"

So in short, not now, but later.

You can do it indirectly by first finding the PID of interest either
from the pg_stat_activity system view or "ps" and then use "netstat
-p" to find the connection associated with that PID.

Cheers,
Steve


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [hidden email])