Re: Wrong stat on pg_stat_user_tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Wrong stat on pg_stat_user_tables
Дата
Msg-id 31468.1474984668@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Wrong stat on pg_stat_user_tables  (Thomas SIMON <tsimon@neteven.com>)
Ответы Re: Wrong stat on pg_stat_user_tables
Список pgsql-admin
Thomas SIMON <tsimon@neteven.com> writes:
> I have strange behavior with a stat of pg_stat_user_tables (explained
> below), where number of live tuples is not the real number at all.
> ...
> I've comparated my 10 biggest tables, only this table gave me wrong results.

The pgstats stats are only approximate, but ideally they'd converge
towards reality over time when they're wrong.  Seems like maybe this one
table has a usage pattern that's odd enough to throw things off.  Maybe
you have unusual autovacuum/autoanalyze parameters for it, for example?
Is there anything strange about the way you insert/update/delete in it?

A simpler explanation might be that this table has inheritance children
--- the pgstats count would consider only the table itself, but
"select count(1) from items" would scan the child tables too.

            regards, tom lane


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

Предыдущее
От: Scott Whitney
Дата:
Сообщение: Re: /var/run/postgresql/.s.PGSQL.5432 should be 5433
Следующее
От: Glyn Astill
Дата:
Сообщение: Re: Wrong stat on pg_stat_user_tables