Magnus Hagander wrote:
> Updated patch attached.
A few more comments:
- why did you add the client address to PgStat_MsgHdr, rather than
PgStat_MsgBestart? It would be nice to avoid sending the client address
for each and every stats message, as it shouldn't change over the life
of the session.
- I think the backend_client_addr and backend_client_port view columns
should be named "client_addr" and "client_port", respectively.
- Is there a reason you need to expose and then call the private
network_in() function, rather than using inet_in(), which is already public?
- Is the backend startup time sensitive information? Considering this
information is available via ps(1), perhaps it would be better to allow
any user to see any backend's startup time, rather than providing a
false sense of security.
- We return (NULL, -1) for the client address/port if connected via a
unix domain socket, and (NULL, NULL) for the address/port if the
selecting user isn't a superuser / the owner of that client connection.
It seems a little ugly to return NULL for the address in both cases,
since the same value is used for two completely different meanings. Not
sure of a better convention, though -- just idly complaining :)
You needn't respin the patch, as I can make the necessary changes myself
-- I'm just looking for comments on the above before applying.
In response to
pgsql-patches by date
|Next:||From: Magnus Hagander||Date: 2005-05-07 14:35:10|
|Subject: Re: Added columns to pg_stat_activity|
|Previous:||From: Hideyuki Kawashima||Date: 2005-05-07 05:34:39|
|Subject: Re: Please define PQ_BUFFER_SIZE in|