From: | Satoshi Nagayasu <snaga(at)uptime(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
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-29 03:58:01 |
Message-ID: | 508DFEC9.4020102@uptime.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2012/10/24 1:12, Alvaro Herrera wrote:
> 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.
>
I attached the latest one, which splits the reset_time
for bgwriter and walwriter, and provides new system view,
called pg_stat_walwriter, to show the dirty write counter
and the reset time.
Regards,
--
Satoshi Nagayasu <snaga(at)uptime(dot)jp>
Uptime Technologies, LLC. http://www.uptime.jp
Attachment | Content-Type | Size |
---|---|---|
xlogdirtywrite_v4.diff | text/plain | 15.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-10-29 11:05:39 | Re: Logical to physical page mapping |
Previous Message | Jan Wieck | 2012-10-29 03:39:11 | Re: Logical to physical page mapping |