Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)

Поиск
Список
Период
Сортировка
От Maxim Boguk
Тема Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Дата
Msg-id CAK-MWwRzyzX=BfXkMzPGGWCpxgHmc_zBXBYkp74PkYqQLrjtbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-bugs
>
> I'm not sure I understand what you mean.
>
> The timestamp *IS* updated on every write - see this:
>
>
> https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3469
>

 I mean that usually 99.9% writes goes through mmap, which update the
pgstat.tmp file timestamp (but not update last_statwrite value).

But that enough to make backend_read_statsfile happy around
https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3972
without kicking  poor statistic collector (and forcing full file rewrite) at
https://github.com/postgres/postgres/blob/REL9_2_STABLE/src/backend/postmaster/pgstat.c#L3978


PS: 1second autovacuum_naptime could be useful if you have small but very
very actively updated tables, over 1 minute they could growth 100-500x size
without autovacuum.
1minute naptime will have the same issue with 500 small idle databases :).



--
Maxim Boguk
Senior Postgresql DBA
http://www.postgresql-consulting.ru/ <http://www.postgresql-consulting.com/>

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)