From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Introduce a new view for checkpointer related stats |
Date: | 2023-02-09 07:03:49 |
Message-ID: | 20230209070349.7qtgx2npf264njrq@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2023-02-09 12:21:51 +0530, Bharath Rupireddy wrote:
> @@ -1105,18 +1105,22 @@ CREATE VIEW pg_stat_archiver AS
>
> CREATE VIEW pg_stat_bgwriter AS
> SELECT
> - pg_stat_get_bgwriter_timed_checkpoints() AS checkpoints_timed,
> - pg_stat_get_bgwriter_requested_checkpoints() AS checkpoints_req,
> - pg_stat_get_checkpoint_write_time() AS checkpoint_write_time,
> - pg_stat_get_checkpoint_sync_time() AS checkpoint_sync_time,
> - pg_stat_get_bgwriter_buf_written_checkpoints() AS buffers_checkpoint,
> pg_stat_get_bgwriter_buf_written_clean() AS buffers_clean,
> pg_stat_get_bgwriter_maxwritten_clean() AS maxwritten_clean,
> - pg_stat_get_buf_written_backend() AS buffers_backend,
> - pg_stat_get_buf_fsync_backend() AS buffers_backend_fsync,
> pg_stat_get_buf_alloc() AS buffers_alloc,
> pg_stat_get_bgwriter_stat_reset_time() AS stats_reset;
>
> +CREATE VIEW pg_stat_checkpointer AS
> + SELECT
> + pg_stat_get_timed_checkpoints() AS timed_checkpoints,
> + pg_stat_get_requested_checkpoints() AS requested_checkpoints,
> + pg_stat_get_checkpoint_write_time() AS checkpoint_write_time,
> + pg_stat_get_checkpoint_sync_time() AS checkpoint_sync_time,
> + pg_stat_get_buf_written_checkpoints() AS buffers_written_checkpoints,
> + pg_stat_get_buf_written_backend() AS buffers_written_backend,
> + pg_stat_get_buf_fsync_backend() AS buffers_fsync_backend,
> + pg_stat_get_checkpointer_stat_reset_time() AS stats_reset;
> +
I don't think the backend written stats belong more accurately in
pg_stat_checkpointer than pg_stat_bgwriter.
I continue to be worried about breaking just about any postgres monitoring
setup.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2023-02-09 07:08:03 | Re: [PoC] Improve dead tuple storage for lazy vacuum |
Previous Message | Bharath Rupireddy | 2023-02-09 06:51:51 | Re: Introduce a new view for checkpointer related stats |