mirror of
https://github.com/postgres/postgres.git
synced 2026-10-23 13:29:09 +03:00
Callers of WALReadFromBuffers() read data from the WAL buffers (currently only WAL senders). This commit makes now available the number of pages read from the WAL uffers in pg_stat_io.hits under object "wal" and context "normal". A read from a WAL file is counted in pg_stat_io.reads and read_bytes. This new information can be useful for the tuning of wal_buffers, where the number of hits matches with the number of pages found as available in the buffers. Note that WALReadFromBuffers() may be called for an amount of data worth less than one WAL page, and that a partial page read is counted as one hit. Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/CALj2ACVfF2Uj9NoFy-5m98HNtjHpuD17EDE9twVeJng-jTAe7A@mail.gmail.com