Re: not all pg_stat_database fields reset after pg_stat_reset()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: not all pg_stat_database fields reset after pg_stat_reset()
Дата
Msg-id 4350.1292088691@sss.pgh.pa.us
обсуждение исходный текст
Ответ на not all pg_stat_database fields reset after pg_stat_reset()  (tv@fuzzy.cz)
Ответы Re: not all pg_stat_database fields reset after pg_stat_reset()  (tv@fuzzy.cz)
Re: not all pg_stat_database fields reset after pg_stat_reset()  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-bugs
tv@fuzzy.cz writes:
> After calling pg_stat_reset, some of the database stats fields are not
> actually reset, the value is preserved. I've found the bug is actually in
> pgstat_recv_resetcounter function, where only some of the
> PgStat_StatDBEntry fields are reset to 0.

> This is true for those 6 fields:

> n_tuples_returned
> n_tuples_fetched
> n_tuples_inserted
> n_tuples_updated
> n_tuples_deleted
> last_autovac_time

Hmm.  I think that not resetting the n_tuples_xxx fields was simply an
oversight in Magnus' patch that added them,
http://archives.postgresql.org/pgsql-committers/2007-03/msg00144.php
Magnus, was this intentional by any chance?

However, I disagree with resetting last_autovac_time ... that's not a
counter, so there's no particularly good reason to discard its value.

            regards, tom lane

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

Предыдущее
От: tv@fuzzy.cz
Дата:
Сообщение: not all pg_stat_database fields reset after pg_stat_reset()
Следующее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: not all pg_stat_database fields reset after pg_stat_reset()