Re: statistics for shared catalogs not updated when autovacuum is off

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: statistics for shared catalogs not updated when autovacuum is off
Дата
Msg-id 56AF7093.7070804@BlueTreble.com
обсуждение исходный текст
Ответ на statistics for shared catalogs not updated when autovacuum is off  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: statistics for shared catalogs not updated when autovacuum is off  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On 1/30/16 5:05 PM, Peter Eisentraut wrote:
> When autovacuum is off, the statistics in pg_stat_sys_tables for shared
> catalogs (e.g., pg_authid, pg_database) never update.  So seq_scan
> doesn't update when you read the table, last_analyze doesn't update when
> you run analyze, etc.
>
> But when you shut down the server and restart it with autovacuum on, the

What about with autovacuum still off?

> updated statistics magically appear right away.  So seq_scan is updated
> with the number of reads you did before the shutdown, last_analyze
> updates with the time of the analyze you did before the shutdown, etc.
> So the data is saved, just not propagated to the view properly.
>
> I can reproduce this back to 9.3, but not 9.2.  Any ideas?

ISTR that there's some code in the autovac launcher that ensures certain 
stats have been loaded from the file into memory; I'm guessing that the 
functions implementing the shared catalog views need something similar.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Way to check whether a particular block is on the shared_buffer?
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Trigger.sgml