Re: stats collector spins my disk up every 500ms (8.2.3) - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: stats collector spins my disk up every 500ms (8.2.3)
Date
Msg-id 20070515204720.GQ12731@alvh.no-ip.org
Whole thread Raw
In response to stats collector spins my disk up every 500ms (8.2.3)  (Daniel Barlow <dan@coruskate.net>)
Responses Re: stats collector spins my disk up every 500ms (8.2.3)
Re: stats collector spins my disk up every 500ms (8.2.3)
List pgsql-general
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

Attachment

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Compile problems with contrib/xml in 7 series
Next
From: Justin Pasher
Date:
Subject: Fixing broken permissions for deleted user