Re: bgwriter stats

From: Darcy Buskermolen <darcy(at)ok-connect(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Cc: Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: bgwriter stats
Date: 2007-03-20 00:51:05
Message-ID: 200703191751.06577.darcy@ok-connect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Monday 19 March 2007 15:32, Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > I want to be able to pull some stats out of the bgwriter to be able to
> > track things. One thing is the total number of buffers written out.
> > Other things are the "number of checkpoints" and such.
> >
> > Anyway. Attached patch adds this to the bgwriter shared memory. Is it
> > safe to do this, and then just have a regular function running in a
> > normal backend pulling out the value and returning it to the user,
> > without locking? Given that only the bgwriter can write to it?
>
> This seems quite a bizarre way to do things. Why wouldn't you implement
> this functionality by shipping messages to the stats collector?

I'm with Tom on this one.. All of our current stats are done via the stats
collector, we should continue that way. While we are on the subject of
stats, does anybody else feel there is merrit in haveing block level writes
tracked on a relation by relation bases?

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-03-20 01:46:31 Re: Win32 shmem
Previous Message Tom Lane 2007-03-19 22:39:28 Re: bgwriter stats