From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_stat_statements: track number of rows processed by REFRESH MA
Date: Thu, 12 Nov 2020 02:27:35 +0000
Message-ID: <E1kd2Kl-0007Es-NB@gemulon.postgresql.org> (raw)
pg_stat_statements: track number of rows processed by REFRESH MATERIALIZED VIEW.
Commit 6023b7ea71 allowed pg_stat_statements to track the number
of rows retrieved or affected by some utility commands including
CREATE MATERIALIZED VIEW. However it did not track the rowcount
of REFRESH MATERIALIZED VIEW. This commit allows pg_stat_statements
to track that.
To track that, this commit changes the query completion for
REFRESH MATERIALIZED VIEW so that it saves the rowcount. But note that
the rowcount is still not displayed in the command completion tag output.
That is, the display_rowcount flag of CMDTAG_REFRESH_MATERIALIZED_VIEW
command tag is left false in cmdtaglist.h. Otherwise, the change of
completion tag output might break applications using it.
Author: Katsuragi Yuta, Seino Yuki
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/71f6bc72f8bbaa06e701f8bd2562c347@oss.nttdata.com
Discussion: https://postgr.es/m/aadbfba9-e4bb-9531-6b3a-d13c31c8f4fe@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b62e6056a05c60ce9edf93e87e1487ae50245a04
Modified Files
--------------
contrib/pg_stat_statements/expected/pg_stat_statements.out | 8 +++++---
contrib/pg_stat_statements/pg_stat_statements.c | 9 +++++----
contrib/pg_stat_statements/sql/pg_stat_statements.sql | 5 +++--
src/backend/commands/matview.c | 11 +++++++++++
4 files changed, 24 insertions(+), 9 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: pg_stat_statements: track number of rows processed by REFRESH MA
In-Reply-To: <E1kd2Kl-0007Es-NB@gemulon.postgresql.org>
References: <E1kd2Kl-0007Es-NB@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