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-MWwSXXWFA-Rgpo9EE-cO+wCs=xDDjoJP9+P6RR1SY1HiWpQ@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>)
List pgsql-bugs
FWIW, I got curious and checked why we decided not to implement this
> while reworking the stats in 9.3, as keeping an is_dirty flag seems as a
> rather straightforward and simple optimization.
>
> Turns out it's actually considerably more complex, because one of the
> sources of statistics updates are (surprise surprise) autovacuum
> workers. So the whole flow may look like this (in >= 9.3):
>
>    1) launcher requests a fresh stats file (dbs list only)
>    2) worker is started for a particular DB (by launcher)
>    3) the worker requests a stats file (with details for the DB)
>


Now for (nearly) idle databases worker do nothing and simple exit in 99.9%.
And if there a lot of idle/low-active db's in cluster - is_dirty tracking
would be beneficial on both pre 9.3 and after 9.3 versions (and in 9.3+ it
will be especially effective because id_dirty tracked per-db basis).

Kind Regards,
Maksym

pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Next
From: Tom Lane
Date:
Subject: Re: BUG #12053: Strange behavior for numeric types with unspecified precision-scale