Re: New statistics for tuning WAL buffer size - Mailing list pgsql-hackers

From Masahiro Ikeda
Subject Re: New statistics for tuning WAL buffer size
Date
Msg-id 8066eb5412b580e07db0f29611d6e909@oss.nttdata.com
Whole thread Raw
In response to Re: New statistics for tuning WAL buffer size  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: New statistics for tuning WAL buffer size  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
> +/* ----------
> + * Backend types
> + * ----------
> 
> You seem to forget to add "*/" into the above comment.
> This issue could cause the following compiler warning.
> ../../src/include/pgstat.h:761:1: warning: '/*' within block comment 
> [-Wcomment]

Thanks for the comment. I fixed.

> The contents of pg_stat_walwrites are reset when the server
> is restarted. Isn't this problematic? IMO since pg_stat_walwrites
> is a collected statistics view, basically its contents should be
> kept even in the case of server restart.

I agree your opinion.
I modified to use the statistics collector and persist the wal 
statistics.


I changed the view name from pg_stat_walwrites to pg_stat_walwriter.
I think it is better to match naming scheme with other views like 
pg_stat_bgwriter,
which is for bgwriter statistics but it has the statistics related to 
backend.

The pg_stat_walwriter is not security restricted now, so ordinary users 
can access it.
I has the same security level as pg_stat_archiver.If you have any 
comments, please let me know.


Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION
Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [Patch] Optimize dropping of relation buffers using dlist
Next
From: Dilip Kumar
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions