Berend Tober wrote:
> > Tony Caduto wrote:
> >> Hi,
> >> Does anyone know if there is a way to get the backends IP address from
> >> the PID?
> >> I am using the view pg_stat_activity and it would be nice if it would
> >> also display the IP address along with the PID.
> >>
> >> I can see the IP address when I do a ps -ef but it would be nice to be
> >> able to get it via a sql command.
> >
> > Added to TODO:
> >
> > * Add IP address to pg_stat_activity
> >
>
> While this does not involve the POD, but doesn't this give the IP address of
> the host:
>
> select inet_server_addr()
>
> Or is he talking about something else?
Yes, I updated the TODO:
* Add the client IP address to pg_stat_activity
and while there is a client version that does your connection, it
doesn't work for other connections.
I think we should display all the info we show in ps -ef in
pg_stat_activity and the one piece we don't give currently is the client
address.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073