Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: "Anton A. Melnikov" <aamelnikov@inbox.ru>
Cc: Andres Freund <andres@anarazel.de>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-11-28T18:34:22Z
Lists: pgsql-hackers
Hi, Anton!
On Thu, Mar 16, 2023 at 2:39 PM Anton A. Melnikov <aamelnikov@inbox.ru> wrote:
> On 15.03.2023 21:29, Gregory Stark (as CFM) wrote:
>
> > These patches that are "Needs Review" and have received no comments at
> > all since before March 1st are these. If your patch is amongst this
> > list I would suggest any of:
> >
> > 1) Move it yourself to the next CF (or withdraw it)
> > 2) Post to the list with any pending questions asking for specific
> > feedback -- it's much more likely to get feedback than just a generic
> > "here's a patch plz review"...
> > 3) Mark it Ready for Committer and possibly post explaining the
> > resolution to any earlier questions to make it easier for a committer
> > to understand the state
> >
>
> There are two different patch variants and some discussion expected.
> So moved them to the next CF.
Thank you for your detailed observation regarding the spike growth of
the checkpoint_req counter on the replica following a large insert
operation on the master. After reviewing your description and the
log, I agree with Kyotaro Horiguchi that the behavior you've outlined,
though potentially perceived as annoying, does not constitute a bug in
the PostgreSQL.
After examining the second patch
("v2-0001-Add-restartpoint-stats.patch"), it appears that adding
additional statistics as outlined in the patch is the most suitable
approach to address the concerns raised. This solution provides more
visibility into the system's behavior without altering its core
mechanics. However, it's essential that this additional functionality
is accompanied by comprehensive documentation to ensure clear
understanding and ease of use by the PostgreSQL community.
Please consider expanding the documentation to include detailed
explanations of the new statistics and their implications in various
scenarios.
------
Regards,
Alexander Korotkov
Commits
-
Improve descriptions of some pg_stat_checkpoints functions in pg_proc.dat.
- 1909835c28a1 18.0 landed
-
docs: Enhance the pg_stat_checkpointer view documentation.
- a19f83f87966 18.0 landed
-
Add num_done counter to the pg_stat_checkpointer view.
- 559efce1d684 18.0 landed
-
docs: Improve the description of num_timed column in pg_stat_checkpointer.
- fa3a022136fc 17.0 landed
- a7c39db5eb34 18.0 landed
-
Improve documentation for pg_stat_checkpointer fields
- e820db5b56b2 17.0 landed
-
Enhance checkpointer restartpoint statistics
- 12915a58eec9 17.0 landed
-
Introduce pg_stat_checkpointer
- 96f052613f35 17.0 cited