Re: wal_buffers
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Fujii Masao <masao.fujii@gmail.com>, Euler Taveira de Oliveira <euler@timbira.com>, pgsql-hackers@postgresql.org
Date: 2012-02-20T19:23:31Z
Lists: 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 invent a 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