Re: PATCH: regular logging of checkpoint progress

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: regular logging of checkpoint progress
Date: 2011-08-26 07:54:19
Message-ID: CABUevEyhKJcyTD_Dpg0nx4DBytVJZNbCeVyyKEP_Ac9f9YBthA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 25, 2011 at 22:57, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
> Hello,
>
> I'd like to propose a small patch that allows better checkpoint progress
> monitoring. The patch is quite simple - it adds a new integer GUC
> "checkpoint_update_limit" and every time checkpoint writes this number of
> buffers, it does two things:
>
> (a) logs a "checkpoint status" message into the server log, with info
> about total number of buffers to write, number of already written buffers,
> current and average write speed and estimate of remaining time
>
> (b) sends bgwriter stats (so that the buffers_checkpoint is updated)
>
> I believe this will make checkpoint tuning easier, especially with large
> shared bufferers and large when there's other write activity (so that it's
> difficult to see checkpoint I/O).
>
> The default value (0) means this continuous logging is disabled.

This seems like the wrong thing to write to the log. It's really only
useful *during* the checkpoint run, isn't it? If so, I think it should
go in a pg_stat view. In theory, this could be the "progress view" or
"progress field" talked about around Gregs previous patch - or it
could just be modifying the commandstring in pg_stat_activity. Either
way, it should be updated in shared memory in that case (like current
query is), and not sent with a message to the collector.

IMHO, of course ;)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2011-08-26 08:46:33 Re: PATCH: regular logging of checkpoint progress
Previous Message Greg Smith 2011-08-26 07:35:05 Re: PATCH: regular logging of checkpoint progress