Re: Inconsistency in reporting checkpointer stats - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Inconsistency in reporting checkpointer stats
Date
Msg-id CA+TgmoZ+zUmTWzHEs9q1SyS4nyG7=bmibY4rHTOptAhj+KLnkA@mail.gmail.com
Whole thread Raw
In response to Inconsistency in reporting checkpointer stats  (Nitin Jadhav <nitinjadhavpostgres@gmail.com>)
Responses Re: Inconsistency in reporting checkpointer stats  (Nitin Jadhav <nitinjadhavpostgres@gmail.com>)
List pgsql-hackers
On Wed, Dec 14, 2022 at 2:32 AM Nitin Jadhav
<nitinjadhavpostgres@gmail.com> wrote:
> In order to fix this, the
> PendingCheckpointerStats.buf_written_checkpoints should be incremented
> in SlruInternalWritePage() similar to
> CheckpointStats.ckpt_bufs_written. I have attached the patch for the
> same. Please share your thoughts.

Presumably we could make this consistent either by counting SLRU
writes in both places, or by counting them in neither place. This
proposal would count them in both places. But why is that the right
thing to do?

I'm somewhat inclined to think that we should use "buffers" to mean
regular data buffers, and if SLRU buffers also need to be counted, we
ought to make that a separate counter. Or just leave it out
altogether.

This is arguable, though, for sure....

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Add sub-transaction overflow status in pg_stat_activity
Next
From: Robert Haas
Date:
Subject: Re: (non) translatable string splicing