On Mon, Feb 20, 2012 at 3:59 AM, Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers