Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) - Mailing list pgsql-bugs

From Maxim Boguk
Subject Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Date
Msg-id CAK-MWwRzyzX=BfXkMzPGGWCpxgHmc_zBXBYkp74PkYqQLrjtbQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)  (Tomas Vondra <tv@fuzzy.cz>)
List 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 by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Next
From: Tomas Vondra
Date:
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)