Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: "Anton A(dot) Melnikov" <a(dot)melnikov(at)postgrespro(dot)ru>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, "Anton A(dot) Melnikov" <aamelnikov(at)inbox(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.
Date: 2024-03-11 09:48:25
Message-ID: CAPpHfduFpdq0dUsF=SmTtYit684JoSQrXvzhA+hap-tCA8Z2cA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 11, 2024 at 5:43 AM Anton A. Melnikov
<a(dot)melnikov(at)postgrespro(dot)ru> wrote:
> On 11.03.2024 03:39, Alexander Korotkov wrote:
> > Now that we distinguish stats for checkpoints and
> > restartpoints, we need to update the docs. Please, check the patch
> > attached.
>
> Maybe bring the pg_stat_get_checkpointer_buffers_written() description in consistent with these changes?
> Like that:
>
> --- a/src/include/catalog/pg_proc.dat
> +++ b/src/include/catalog/pg_proc.dat
> @@ -5740 +5740 @@
> - descr => 'statistics: number of buffers written by the checkpointer',
> + descr => 'statistics: number of buffers written during checkpoints and restartpoints',

This makes sense. I've included this into the revised patch.

> And after i took a fresh look at this patch i noticed a simple way to extract
> write_time and sync_time counters for restartpoints too.
>
> What do you think, is there a sense to do this?

I'm not sure we need this. The ways we trigger checkpoints and
restartpoints are different. This is why we needed separate
statistics. But the process of writing buffers is the same.

------
Regards,
Alexander Korotkov

Attachment Content-Type Size
rename_pg_stat_get_checkpointer_fields_v2.patch application/octet-stream 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2024-03-11 09:52:59 Re: Support a wildcard in backtrace_functions
Previous Message Heikki Linnakangas 2024-03-11 09:29:44 Re: Confine vacuum skip logic to lazy_scan_skip