Re: wal_buffers - Mailing list pgsql-hackers

From Robert Haas
Subject Re: wal_buffers
Date
Msg-id CA+Tgmob6h_0D8Qtn1+sqjSFHEQRgJeTVtg4CKASNve-+djk_Tw@mail.gmail.com
Whole thread Raw
In response to Re: wal_buffers  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Mon, Feb 20, 2012 at 3:59 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> There is no existing statistics view suitable to include such information.
>> What about defining pg_stat_xlog or something?
>
> Perhaps pg_stat_perf so we don't need to find a new home every time.
>
> Thinking about it, I think renaming pg_stat_bgwriter would make more sense.

When we created pg_stat_reset_shared(text), we seemed to be
contemplating the idea of multiple sets of shared counters identified
by names -- bgwriter for the background writer, and maybe other things
for other subsystems.  So we'd have to think about how to adjust that.I do agree with you that it seems a shame to
inventa whole new view
 
for one counter...

Another thought is that I'm not sure it makes sense to run this
through the stats system at all.  We could regard it as a shared
memory counter protected by one of the LWLocks involved, which would
probably be quite a bit cheaper - just one machine instruction to
increment it at need.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 16-bit page checksums for 9.2
Next
From: Billy Earney
Date:
Subject: Re: Future of our regular expression code