Re: Inconsistency in reporting checkpointer stats

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inconsistency in reporting checkpointer stats
Date: 2022-12-19 21:08:23
Message-ID: CA+TgmoZ+zUmTWzHEs9q1SyS4nyG7=bmibY4rHTOptAhj+KLnkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 14, 2022 at 2:32 AM Nitin Jadhav
<nitinjadhavpostgres(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-12-19 21:14:04 Re: (non) translatable string splicing
Previous Message Robert Haas 2022-12-19 21:02:34 Re: Add sub-transaction overflow status in pg_stat_activity