Re: New statistics for tuning WAL buffer size
Masahiro Ikeda <ikedamsh@oss.nttdata.com>
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>,
tsunakawa.takay@fujitsu.com
Date: 2020-09-02T09:56:17Z
Lists: pgsql-hackers
Attachments
- 0003_pg_stat_walwriter_view.patch (text/x-diff) patch
> +/* ---------- > + * 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
Commits
-
Add pg_stat_wal statistics view.
- 8d9a935965f0 14.0 landed