Daniel Barlow wrote:
> Questions:
> 1) this is on a system with I believe to be quiescent - there is only
> one client open which is not doing anything. Before I get more involved
> with this, can someone just confirm that pgstat will continue to update
> this file even when nothing is happening? If not, then I guess
> something /is/ happening and I need to investigate what it is (advice on
> how to track it down is welcome - I already have statement logging on,
> and there's nothing showing in there)
Hmm, I don't think we have an optimization to avoid writing it when the
data hasn't changed. This seems easy to do ... see attached patch
(untested)
> 2) does the pgstat.stat file need to be preserved when postgres is not
> running? i.e. could I move it to a tmpfs or something? I can see
> nothing which suggests it has particularly important long-lived data
Yes, the data in the pgstat file is supposed to be kept around when the
system is restarted -- more so if you want autovacuum to work correctly!
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support