From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Expose BufferUsageAccumDiff().
Date: Mon, 30 Mar 2020 03:16:06 +0000
Message-ID: <E1jIkuE-0005jp-1N@gemulon.postgresql.org> (raw)
Expose BufferUsageAccumDiff().
Previously pg_stat_statements calculated the difference of buffer counters
by its own code even while BufferUsageAccumDiff() had the same code.
This commit expose BufferUsageAccumDiff() and makes pg_stat_statements
use it for the calculation, in order to simply the code.
This change also would be useful for the upcoming patch for the planning
counters in pg_stat_statements because the patch will add one more code
for the calculation of difference of buffer counters and that can easily be
done by using BufferUsageAccumDiff().
Author: Julien Rouhaud
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/bdfee4e0-a304-2498-8da5-3cb52c0a193e@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4a539a25ebfc48329fd656a95f3c1eb2cda38af3
Modified Files
--------------
contrib/pg_stat_statements/pg_stat_statements.c | 26 ++-----------------------
src/backend/executor/instrument.c | 4 +---
src/include/executor/instrument.h | 2 ++
3 files changed, 5 insertions(+), 27 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Expose BufferUsageAccumDiff().
In-Reply-To: <E1jIkuE-0005jp-1N@gemulon.postgresql.org>
References: <E1jIkuE-0005jp-1N@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