> +/* ----------
> + * 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