Re: [PATCH] Expose checkpoint reason to completion log messages.

From: VASUKI M <vasukianand0119(at)gmail(dot)com>
To: Michael Banck <mbanck(at)gmx(dot)net>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Soumya S Murali <soumyamurali(dot)work(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, melanieplageman(at)gmail(dot)com, juanjo(dot)santamaria(at)gmail(dot)com
Subject: Re: [PATCH] Expose checkpoint reason to completion log messages.
Date: 2026-01-06 11:10:00
Message-ID: CAE2r8H7yMJ2XncBM59-n0jMOGDSw3R2gLn6Cd_-eq_y-3NPw=w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yeah,the proposed idea makes sense to me,as users will almost see at the
end of log messages it will be easy to find out what is the checkpoint
reason.
+1 for it.

Regards,
Vasuki M

On Tue, Jan 6, 2026 at 4:26 PM Michael Banck <mbanck(at)gmx(dot)net> wrote:

> Hi,
>
> On Tue, Jan 06, 2026 at 02:41:16PM +0900, Fujii Masao wrote:
> > On Thu, Jan 1, 2026 at 5:09 PM Soumya S Murali
> > <soumyamurali(dot)work(at)gmail(dot)com> wrote:
> > > On Thu, Dec 18, 2025 at 5:49 AM Andres Freund <andres(at)anarazel(dot)de>
> wrote:
> > > > On 2025-12-01 16:48:56 +0530, Soumya S Murali wrote:
> > > > > This patch is an update after reworking the “checkpoint reason”
> changes as
> > > > > a standalone patch, separate from the pg_stat_checkpointer
> additions as
> > > > > suggested [1].
> >
> > This kind of information already seems to be included in the
> > checkpoint starting log message, for example:
> >
> > LOG: checkpoint starting: fast force wait
> >
> > Why do you want to include essentially the same information in the
> > checkpoint ending log message as well?
>
> I do think it is useful; the checkpoint finished message has a lot more
> information than the checkpoint starting meessage (which basically only
> mentions the reason) and when you extract log messages you currently
> need to backtrack from the checkpoint finished message to the
> corresponding checkpoint starting message to find out the type. Seeing
> how the checkpoint finished message is so much more verbose anyway, I
> think adding the reason to it is reasonably and helpful.
>
>
> Michael
>
>
>
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-01-06 11:43:31 Re: Wrong comment for ReplicationSlotCreate
Previous Message Jim Jones 2026-01-06 11:02:36 Re: WIP - xmlvalidate implementation from TODO list