Re: PATCH: regular logging of checkpoint progress - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: PATCH: regular logging of checkpoint progress
Date
Msg-id CABUevEzg46c2d1br+pv_+zQKFFC76sr1LKbQz0xCy2HD9xx0MQ@mail.gmail.com
Whole thread Raw
In response to Re: PATCH: regular logging of checkpoint progress  ("Tomas Vondra" <tv@fuzzy.cz>)
Responses Re: PATCH: regular logging of checkpoint progress
List pgsql-hackers
On Fri, Sep 2, 2011 at 11:01, Tomas Vondra <tv@fuzzy.cz> wrote:
> On 2 Září 2011, 9:47, Magnus Hagander wrote:
>> On Thu, Sep 1, 2011 at 21:59, Tomas Vondra <tv@fuzzy.cz> wrote:
>>> I've prepared a significantly simplified version of the patch. The two
>>> main changes are
>>>
>>> (a) it does not update the pg_stat_bgwriter anymore, it just prints an
>>> info to the server log
>>> (b) a new GUC is not required, it's driven by the log_checkpoints
>>
>> The comment still refers to the checkpoint_update_limit.
>
> OK, I'll fix that.
>
>>> This version will log at least 10 'checkpoint status' lines (at 10%,
>>> 20%,
>>> 30%, ...) and whenever 5 seconds since the last log elapses. The time is
>>> not checked for each buffer but for 128 buffers.
>>>
>>> So if the checkpoint is very slow, you'll get a message every 5 seconds,
>>> if it's fast you'll get 10 messages.
>>
>> I would personally find this very annoying. If I read it correctly,
>> anybody with a database with no problem at all but that has
>> log_checkpoints on suddenly got at least 10 times as many messages? I
>> generally try to advise my clients to *not* log excessively because
>> then they will end up not bothering to read the logs...
>
> What about logging it with a lower level, e.g. NOTICE instead of the
> current LOG? If that's not a solution then a new GUC is needed I guess.

I guess if it's at a DEBUG level it won't annoy anybody who doesn't
need it. Not sure if NOTICE is low enough..

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


pgsql-hackers by date:

Previous
From: Gabriele Bartolini
Date:
Subject: Italian PGDay 2011, Call for papers is now open
Next
From: PostgreSQL - Hans-Jürgen Schönig
Date:
Subject: Re: help with plug-in function for additional (partition/shard) visibility checks