Re: Where does data in pg_stat_user_tables come from?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Where does data in pg_stat_user_tables come from?
Дата
Msg-id 4C92645A.1040208@agliodbs.com
обсуждение исходный текст
Ответ на Re: Where does data in pg_stat_user_tables come from?  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Where does data in pg_stat_user_tables come from?  (Guillaume Lelarge <guillaume@lelarge.info>)
Re: Where does data in pg_stat_user_tables come from?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
> It's been pure nonsense in this thread.  Please show an example of
> what's not working.

1) Init a postgresql 8.3 with autovacuum disabled.

2) Load a backup of a database into that PostgreSQL.

3) Check pg_stat_user_tables.  n_live_tup for all tables will be 0.

4) VACUUM ANALYZE the whole database.

5) n_live_tup will *still* be 0.  Whereas reltuples in pg_class will be
reasonable accurate.

> Um ... it updates the last_autovacuum and last_autoanalyze columns,
> but the others are not its responsibility.

Right. I'm contending that ANALYZE *should* update those columns.
Current behavior is unintuitive and makes the stats in
pg_stat_user_tables almost useless, since you can never get even
approximately a coherent snapshot of data for all tables.

--
                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Performance problem with joined aggregate query
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Where does data in pg_stat_user_tables come from?