From: | Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
Date: | 2014-11-26 22:06:19 |
Message-ID: | CAK-MWwRzyzX=BfXkMzPGGWCpxgHmc_zBXBYkp74PkYqQLrjtbQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
>
> 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/>
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2014-11-26 22:26:34 | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
Previous Message | Tomas Vondra | 2014-11-26 21:53:58 | Re: BUG #12071: Stat collector went crasy (50MB/s constant writes) |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2014-11-26 22:26:01 | Re: memory explosion on planning complex query |
Previous Message | Andrew Dunstan | 2014-11-26 22:00:31 | memory explosion on planning complex query |