On Thu, Jan 06, 2022 at 04:34:38PM +0900, Kyotaro Horiguchi wrote:
> At Wed, 5 Jan 2022 17:18:06 -0600, Justin Pryzby <pry...@telsasoft.com> wrote 
> in 
> > 
> > |commit 6ef2eba3f57f17960b7cd4958e18aa79e357de2f
> > |Author: Andres Freund <and...@anarazel.de>
> > |Date:   Thu Dec 22 11:31:50 2016 -0800
> > |
> > |    Skip checkpoints, archiving on idle systems.
> > 
> > Note that logging a message may not be benign ; I think it could cause the
> > disks to spin up, that would othewise have been in power saving mode,
> > especially if you log to syslog, which can issue fsync.  Also, part of the
> > argument for enabling log_checkpoint by default was that a small, quiescent
> > instance would not write logs every 5 minutes.
> 
> Agreed. -1 to just raising elevel of the message.

-1 too.

> If someone keen to show some debug messages, it is viable for
> arbitrary messages by lowering log_min_messages then inserting a
> custom filter to emit_log_hook.  It invites some overhead on
> irrelevant processes, but that overhead would be avoidable with a
> *bit* dirty hack in the filter,
> 
> We might want to discuss more convenient or cleaner way to get the
> same result.

We could add a checkpoint_skipped counter to pg_stat_bgwriter for instance.


Reply via email to