Re: add checkpoint stats of snapshot and mapping files of pg_logical dir

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Date: 2022-03-21 20:24:48
Message-ID: 20220321202448.GA1513050@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 21, 2022 at 11:27:15AM +0530, Bharath Rupireddy wrote:
> On Sat, Mar 19, 2022 at 3:16 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> /* buffer stats */
>> appendStringInfo(&logmsg, "wrote %d buffers (%.1f%%); ",
>> CheckpointStats.ckpt_bufs_written,
>> (double) CheckpointStats.ckpt_bufs_written * 100 / NBuffers);
>>
>> /* WAL file stats */
>> appendStringInfo(&logmsg, "%d WAL file(s) added, %d removed, %d recycled; ",
>> CheckpointStats.ckpt_segs_added,
>> CheckpointStats.ckpt_segs_removed,
>> CheckpointStats.ckpt_segs_recycled);
>
> Do we actually need to granularize the message like this? I actually
> don't think so, because we print the stats even if they are 0 (buffers
> written is 0 or WAL segments added is 0 and so on).

I suggested it because I thought it would improve readability and simplify
optionally adding new stats to the message. If there is another way to
accomplish those things, that is fine by me.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2022-03-21 20:25:18 Re: jsonpath syntax extensions
Previous Message Joe Conway 2022-03-21 20:15:33 Re: [PATCH v2] use has_privs_for_role for predefined roles