Be clear about what log_checkpoints emits in the documentation

Started by Bharath Rupireddyabout 4 years ago3 messages
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
1 attachment(s)

Hi,

Currently the documentation of the log_checkpoints GUC says the following:

Some statistics are included in the log messages, including the number
of buffers written and the time spent writing them.

Usage of the word "Some" makes it a vague statement. Why can't we just
be clear about what statistics the log_checkpoints GUC can emit, like
the attached patch?

Thoughts?

Regards,
Bharath Rupireddy.

Attachments:

v1-0001-Be-clear-about-what-log_checkpoints-emits-in-the-.patchapplication/octet-stream; name=v1-0001-Be-clear-about-what-log_checkpoints-emits-in-the-.patchDownload
From 07e022cb49c16abf0de24ba25e1b5c20dec2c1ae Mon Sep 17 00:00:00 2001
From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: Thu, 23 Dec 2021 15:23:20 +0000
Subject: [PATCH v1] Be clear about what log_checkpoints emits in the
 documentation

Currently the documentation of the log_checkpoints GUC is vague
and the patch here makes it clear say what statistics it emits in
the server logs.
---
 doc/src/sgml/config.sgml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index afbb6c35e3..d985caac1d 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -6789,9 +6789,11 @@ local0.*    /var/log/postgresql
       <listitem>
        <para>
         Causes checkpoints and restartpoints to be logged in the server log.
-        Some statistics are included in the log messages, including the number
-        of buffers written and the time spent writing them.
-        This parameter can only be set in the <filename>postgresql.conf</filename>
+        The log messages include checkpoint or restartpoint kind, statistics
+        such as the number of buffers written, relations synced and the time
+        spent writing/syncing those files, the WAL files added, removed and
+        recycled and the estimated distance between checkpoints or restartpoints
+        in bytes. This parameter can only be set in the <filename>postgresql.conf</filename>
         file or on the server command line. The default is on.
        </para>
       </listitem>
-- 
2.25.1

#2Kyotaro Horiguchi
horikyota.ntt@gmail.com
In reply to: Bharath Rupireddy (#1)
Re: Be clear about what log_checkpoints emits in the documentation

At Thu, 23 Dec 2021 20:56:22 +0530, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote in

Hi,

Currently the documentation of the log_checkpoints GUC says the following:

Some statistics are included in the log messages, including the number
of buffers written and the time spent writing them.

Usage of the word "Some" makes it a vague statement. Why can't we just
be clear about what statistics the log_checkpoints GUC can emit, like
the attached patch?

Thoughts?

It seems like simply a maintenance burden of documentation since it
doesn't add any further detail of any item in a checkpoint log
message. But I'm not sure we want detailed explanations for them and
it seems to me we deliberately never explained the detail of any log
messages.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

#3Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Kyotaro Horiguchi (#2)
Re: Be clear about what log_checkpoints emits in the documentation

On Fri, Dec 24, 2021 at 11:30 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:

At Thu, 23 Dec 2021 20:56:22 +0530, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote in

Hi,

Currently the documentation of the log_checkpoints GUC says the following:

Some statistics are included in the log messages, including the number
of buffers written and the time spent writing them.

Usage of the word "Some" makes it a vague statement. Why can't we just
be clear about what statistics the log_checkpoints GUC can emit, like
the attached patch?

Thoughts?

It seems like simply a maintenance burden of documentation since it
doesn't add any further detail of any item in a checkpoint log
message. But I'm not sure we want detailed explanations for them and
it seems to me we deliberately never explained the detail of any log
messages.

Agreed. "Some statistics" can cover whatever existing and newly added
stuff, if any. Let it be that way.

Regards,
Bharath Rupireddy.