Skip site navigation (1) Skip section navigation (2)

Re: Added columns to pg_stat_activity

From: Neil Conway <neilc(at)samurai(dot)com>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Added columns to pg_stat_activity
Date: 2005-05-07 13:14:44
Message-ID: 427CBF44.70209@samurai.com (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-patches by date

Next:From: Magnus HaganderDate: 2005-05-07 14:35:10
Subject: Re: Added columns to pg_stat_activity
Previous:From: Hideyuki KawashimaDate: 2005-05-07 05:34:39
Subject: Re: Please define PQ_BUFFER_SIZE in

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group