pgsql: Improve IO accounting for temp relation writes - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Improve IO accounting for temp relation writes
Date
Msg-id E1pksjR-001uoN-LW@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Improve IO accounting for temp relation writes

Both pgstat_database and pgBufferUsage count IO timing for reads of temporary
relation blocks into local buffers. However, both failed to count write IO
timing for flushes of dirty local buffers. Fix.

Additionally, FlushRelationBuffers() seems to have omitted counting write
IO (both count and timing) stats for both pgstat_database and
pgBufferUsage. Fix.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20230321023451.7rzy4kjj2iktrg2r%40awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/704261ecc694db11d9b5feb4f05f57778214ba2f

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c   | 17 +++++++++++++++++
src/backend/storage/buffer/localbuf.c | 16 ++++++++++++++++
2 files changed, 33 insertions(+)


pgsql-committers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: pgsql: Refactor background psql TAP functions
Next
From: Andres Freund
Date:
Subject: pgsql: Fix table name clash in recently introduced test