pgsql: Improve IO accounting for temp relation writes

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve IO accounting for temp relation writes
Date: 2023-04-07 20:30:50
Message-ID: E1pksjR-001uoN-LW@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2023-04-07 21:08:56 pgsql: Fix table name clash in recently introduced test
Previous Message Daniel Gustafsson 2023-04-07 20:21:44 pgsql: Refactor background psql TAP functions