Re: New statistics for WAL buffer dirty writes

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Satoshi Nagayasu <snaga(at)uptime(dot)jp>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New statistics for WAL buffer dirty writes
Date: 2012-10-23 16:12:53
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Satoshi Nagayasu escribió:

> With this patch, walwriter process and each backend process
> would sum up dirty writes, and send it to the stat collector.
> So, the value could be saved in the stat file, and could be
> kept on restarting.
> The statistics could be retreive with using
> pg_stat_get_xlog_dirty_writes() function, and could be reset
> with calling pg_stat_reset_shared('walwriter').
> Now, I have one concern.
> The reset time could be captured in globalStats.stat_reset_timestamp,
> but this value is the same with the bgwriter one.
> So, once pg_stat_reset_shared('walwriter') is called,
> stats_reset column in pg_stat_bgwriter does represent
> the reset time for walwriter, not for bgwriter.
> How should we handle this? Should we split this value?
> And should we have new system view for walwriter?

I think the answer to the two last questions is yes. It doesn't seem to
make sense, to me, to have a single reset timings for what are
effectively two separate things.

Please submit an updated patch to next CF. I'm marking this one
returned with feedback. Thanks.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-10-23 16:21:31 Re: too much pgbench init output
Previous Message Alvaro Herrera 2012-10-23 16:02:13 Re: too much pgbench init output