Search Postgresql Archives

pg_stat_reset() not resetting all statistics counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

Should not the execution of pg_stat_reset() reset *all* statistics
counters everywhere in the database?

We would like to use the numbers in pg_stat_database together with
pg_postmaster_start_time() to find out the average values per second of
some of the columns in this view.

But when we execute pg_stat_reset() in our databases, not all values
reported by pg_stat_database get updated. tup_returned, tup_fetched,
tup_inserted, tup_updated and tup_deleted still have the old values
after running pg_stat_reset().

Am I missing anything?

Example: postgreSQL 8.3.7 running in a x86_64 GNU/Linux server.

Data from pg_stat_database for the database 'rtprod' *before* running
pg_stat_reset():

-[ RECORD 5 ]-+--------------
datid         | 16777
datname       | rtprod
numbackends   | 40
xact_commit   | 1800706565
xact_rollback | 98722
blks_read     | 1384382954
blks_hit      | 70569876640
tup_returned  | 1742826466651
tup_fetched   | 67404470469
tup_inserted  | 54681321
tup_updated   | 11495258
tup_deleted   | 18167792


Data from pg_stat_database for the database 'rtprod' *after* running
pg_stat_reset():

-[ RECORD 5 ]-+--------------
datid         | 16777
datname       | rtprod
numbackends   | 40
xact_commit   | 10000
xact_rollback | 2
blks_read     | 60
blks_hit      | 264238
tup_returned  | 1742832161264
tup_fetched   | 67407042466
tup_inserted  | 54681617
tup_updated   | 11495340
tup_deleted   | 18167979

Any ideas?

regards,
-- 
 Rafael Martinez, <r.m.guerrero@xxxxxxxxxxx>
 Center for Information Technology Services
 University of Oslo, Norway

 PGP Public Key: http://folk.uio.no/rafael/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux