Re: Introduce a new view for checkpointer related stats - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Introduce a new view for checkpointer related stats
Date
Msg-id ZT79omePD4D1QqBn@paquier.xyz
Whole thread Raw
In response to Re: Introduce a new view for checkpointer related stats  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Introduce a new view for checkpointer related stats
List pgsql-hackers
On Fri, Oct 27, 2023 at 10:23:34AM +0530, Bharath Rupireddy wrote:
> +1. Changed in the attached v10-001. FWIW, having a test case in
> stats.sql emitting this error message and hint would have helped here.
> If okay, I can add one.

That may be something to do.  At least it was missed on this thread,
even if we don't add a new  pgstat shared type every day.

> PS: I'll park the SLRU flush related patch aside until the approach is
> finalized. I'm posting the pg_stat_checkpointer patch as v10-0001.

+-- Test that reset_shared with checkpointer specified as the stats type works
+SELECT stats_reset AS checkpointer_reset_ts FROM pg_stat_checkpointer \gset
+SELECT pg_stat_reset_shared('checkpointer');
+SELECT stats_reset > :'checkpointer_reset_ts'::timestamptz FROM pg_stat_checkpointer;
+SELECT stats_reset AS checkpointer_reset_ts FROM pg_stat_checkpointer \gset

Note that you have forgotten to update the test of
pg_stat_reset_shared(NULL) to check for the value of
checkpointer_reset_ts.  I've added an extra SELECT to check that for
pg_stat_checkpointer, and applied v8.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: Cleaning up array_in()
Next
From: David Rowley
Date:
Subject: Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?