Identifying time of last stat reset via sql

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Identifying time of last stat reset via sql
Date: 2004-12-15 20:46:28
Message-ID: 200412151346.28092.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I asked this on general, but didn't receive any responses. Is it possible
via SQL to identify the time of the last stat reset (or pg_stat_reset()
call)? This is what I'm lacking to be able to measure query activity
volume over time via SQL. Maybe a function similar to the fictitious
pg_stat_get_last_reset_time() below?

select sum(n_tup_ins + n_tup_upd + n_tup_del)
/ (now() - pg_stat_get_last_reset_time()) as write_qps
from pg_stat_all_tables

If not, would this be considered worthy of a TODO item?
Or is there another built-in approach designed for determining QPS, etc?

Ed

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2004-12-15 20:50:50 Re: possible wierd boolean bug?
Previous Message Joe Conway 2004-12-15 19:41:02 Re: production server down