Hi, On 2017-10-02 00:19:33 +0200, Vik Fearing wrote: > I recently had a sad because I noticed that checkpoint counts were > increasing in pg_stat_bgwriter, but weren't accounted for in my logs > with log_checkpoints enabled. > > After some searching, I found that it was the idle checkpoints that > weren't being logged. I think this is a missed trick in 6ef2eba3f57. > > Attached is a one-liner fix. I realize how imminent we are from > releasing v10 but I hope there is still time for such a minor issue as this.
> diff --git a/src/backend/access/transam/xlog.c > b/src/backend/access/transam/xlog.c > index dd028a12a4..75f6bd4cc1 100644 > --- a/src/backend/access/transam/xlog.c > +++ b/src/backend/access/transam/xlog.c > @@ -8724,7 +8724,7 @@ CreateCheckPoint(int flags) > WALInsertLockRelease(); > LWLockRelease(CheckpointLock); > END_CRIT_SECTION(); > - ereport(DEBUG1, > + ereport(log_checkpoints ? LOG : DEBUG1, > (errmsg("checkpoint skipped because > system is idle"))); > return; > } I'd be ok with applying this now, or in 10.1 - but I do think we should fix this before 11. If nobody protests I'll push later today, so we can get some bf cycles for the very remote case that this causes problems. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers