From: | Daniel Barlow <dan(at)coruskate(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | stats collector spins my disk up every 500ms (8.2.3) |
Date: | 2007-05-14 23:01:01 |
Message-ID: | f2apl8$11o$1@sea.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
While looking for ways to get some more battery life from my laptop, I
noticed that one source of periodic disk writes was the postgres stats
collector process, which appears to write to pgstat.tmp every 500ms. I
could turn it off (in fact, for the moment I have), but I rather like
having working autovacuum ...
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)
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
3) can anyone suggest a way to move the said file that doesn't involve
hacking postgresql source code? Not that I'm especially averse to using
a C compiler, but at the moment I'm using Debian packages and therefore
getting my packaging "for free", as it were.
4) if no answer to (3), what would be a sensible approach? First I
thought it should probably be an option for postgresql.conf, but now I
wonder if it should just be hardcoded to the same directory where the
unix domain socket and the pid file live - they being similarly
transient data.
If this isn't the right mailing list for these questions (I think it
probably is for 1-3 and not for 4 ...) please feel free to move it.
Thanks
-dan
From | Date | Subject | |
---|---|---|---|
Next Message | Reuven M. Lerner | 2007-05-14 23:04:40 | Recovering a messed-up database |
Previous Message | Jeff Davis | 2007-05-14 22:41:36 | Re: Restarting postgres server |