Re: About to add WAL write/fsync statistics to pg_stat_wal view
Masahiro Ikeda <ikedamsh@oss.nttdata.com>
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, PostgreSQL-development
<pgsql-hackers@postgresql.org>, Li Japin <japinli@hotmail.com>,
kuroda.hayato@fujitsu.com
Date: 2021-01-29T08:49:00Z
Lists: pgsql-hackers
Attachments
- v8-0001-Add-statistics-related-to-write-sync-wal-records.patch (text/x-diff) patch v8-0001
- v8-0002-Makes-the-wal-receiver-report-WAL-statistics.patch (text/x-diff) patch v8-0002
On 2021-01-27 00:14, David G. Johnston wrote: > On Mon, Jan 25, 2021 at 11:56 PM Masahiro Ikeda > <ikedamsh@oss.nttdata.com> wrote: > >>> (wal_write) >>> The number of times WAL buffers were written out to disk via >> XLogWrite >>> >> >> Thanks. >> >> I thought it's better to omit "The" and "XLogWrite" because other >> views' >> description >> omits "The" and there is no description of "XlogWrite" in the >> documents. >> What do you think? > > The documentation for WAL does get into the public API level of detail > and doing so here makes what this measures crystal clear. The > potential absence of sufficient detail elsewhere should be corrected > instead of making this description more vague. Specifically, probably > XLogWrite should be added to the WAL overview as part of this update > and probably even have the descriptive section of the documentation > note that the number of times that said function is executed is > exposed as a counter in the wal statistics table - thus closing the > loop. Thanks for your comments. I added the descriptions in documents and separated the patch into attached two patches. First is to add wal i/o activity statistics. Second is to make the wal receiver report the wal statistics. Please let me know if you have any comments. Regards, -- Masahiro Ikeda NTT DATA CORPORATION
Commits
-
Send statistics collected during shutdown checkpoint to the stats collector.
- b82640df0062 14.0 landed
-
Force to send remaining WAL stats to the stats collector at walwriter exit.
- 33394ee6f243 14.0 landed
-
Track total amounts of times spent writing and syncing WAL data to disk.
- ff99918c625a 14.0 landed
-
Retry short writes when flushing WAL.
- 79ce29c734c6 9.4.0 cited