Re: Added columns to pg_stat_activity

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: Added columns to pg_stat_activity
Дата
Msg-id 427CBF44.70209@samurai.com
обсуждение исходный текст
Ответ на Re: Added columns to pg_stat_activity  ("Magnus Hagander" <mha@sollentuna.net>)
Ответы Re: Added columns to pg_stat_activity
Список pgsql-patches
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.

-Neil

В списке pgsql-patches по дате отправления:

Предыдущее
От: Hideyuki Kawashima
Дата:
Сообщение: Re: Please define PQ_BUFFER_SIZE in
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Added columns to pg_stat_activity