On Apr 30, 2005, at 15:10 , Cosimo Streppone wrote:
1) is it possible to know Pg backend uptime with SQL queries? Or must I look at postmaster.pid file? or even something else?
I think that the PID file is your best bet.
2) how can I know the ip addresses/hostnames of clients connecting to server?
I believe that that information is in pg_stat_activity. See:
http://www.postgresql.org/docs/current/static/monitoring.html
3) Is there a way to know the number of queries performed against Pg backend (by each client)? Can I distinguish between selects / updates / inserts / copy / ... ?
I think so, but you have to enable some postgresql.conf settings to get that information logged.
http://www.postgresql.org/docs/8.0/static/runtime-config.html
Regards,
David
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster