Re: Where does data in pg_stat_user_tables come from?

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: Where does data in pg_stat_user_tables come from?
Дата
Msg-id 1284421288.28610.501.camel@jd-desktop.iso-8859-1.charter.com
обсуждение исходный текст
Ответ на Where does data in pg_stat_user_tables come from?  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
On Mon, 2010-09-13 at 16:06 -0700, Josh Berkus wrote:
> All,
>
> I've been looking at pg_stat_user_tables (in 8.3, because of a project I
> have), and it appears that autovacuum, and only autovaccum, updates the
> data for this view.  This means that one can never have data in
> pg_stat_user_tables which is completely up-to-date, and if autovacuum is
> off, the view is useless.

As I recall its kept in shared_buffers (in some kind of counter) and
updated only when it is requested or when autovacuum fires. This was
done because we used to write stats every 500ms and it was a bottleneck.
(IIRC)

Joshua D. Drake


--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt


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

Предыдущее
От: Gerhard Wiesinger
Дата:
Сообщение: Re: Major performance problem after upgrade from 8.3 to 8.4
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Useless sort by