pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve IO accounting for temp relation writes
Date: Fri, 07 Apr 2023 20:30:50 +0000
Message-ID: <E1pksjR-001uoN-LW@gemulon.postgresql.org> (raw)

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(+)



Message-ID: <E1pksjR-001uoN-LW@gemulon.postgresql.org>
Permalink:  ../E1pksjR-001uoN-LW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pksjR-001uoN-LW@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Improve IO accounting for temp relation writes
  In-Reply-To: <E1pksjR-001uoN-LW@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox