pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_stat_statements: track number of rows processed by some utili
3+ messages / 1 participants
[nested] [flat]

* pgsql: pg_stat_statements: track number of rows processed by some utili
@ 2020-07-29 14:23  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Fujii Masao @ 2020-07-29 14:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_stat_statements: track number of rows processed by some utility commands.

This commit makes pg_stat_statements track the total number
of rows retrieved or affected by CREATE TABLE AS, SELECT INTO,
CREATE MATERIALIZED VIEW and FETCH commands.

Suggested-by: Pascal Legrand
Author: Fujii Masao
Reviewed-by: Asif Rehman
Discussion: https://postgr.es/m/1584293755198-0.post@n3.nabble.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6023b7ea717ca04cf1bd53709d9c862db07eaefb

Modified Files
--------------
.../expected/pg_stat_statements.out                | 66 ++++++++++++++++++++++
contrib/pg_stat_statements/pg_stat_statements.c    | 10 +++-
.../pg_stat_statements/sql/pg_stat_statements.sql  | 27 +++++++++
3 files changed, 102 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: pg_stat_statements: track number of rows processed by REFRESH MA
@ 2020-11-12 02:27  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Fujii Masao @ 2020-11-12 02:27 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: pg_stat_statements: Track number of times pgss entries were deal
@ 2020-11-26 12:20  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Fujii Masao @ 2020-11-26 12:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_stat_statements: Track number of times pgss entries were deallocated.

If more distinct statements than pg_stat_statements.max are observed,
pg_stat_statements entries about the least-executed statements are
deallocated. This commit enables us to track the total number of times
those entries were deallocated. That number can be viewed in the
pg_stat_statements_info view that this commit adds. It's useful when
tuning pg_stat_statements.max parameter. If it's high, i.e., the entries
are deallocated very frequently, which might cause the performance
regression and we can increase pg_stat_statements.max to avoid those
frequent deallocations.

The pg_stat_statements_info view is intended to display the statistics
of pg_stat_statements module itself. Currently it has only one column
"dealloc" indicating the number of times entries were deallocated.
But an upcoming patch will add other columns (for example, the time
at which pg_stat_statements statistics were last reset) into the view.

Author: Katsuragi Yuta, Yuki Seino
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/0d9f1107772cf5c3f954e985464c7298@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9fbc3f318d039c3e1e8614c38e40843cf8fcffde

Modified Files
--------------
contrib/pg_stat_statements/Makefile                |  2 +-
.../expected/pg_stat_statements.out                | 15 ++++++
.../pg_stat_statements--1.8--1.9.sql               | 17 ++++++
contrib/pg_stat_statements/pg_stat_statements.c    | 59 ++++++++++++++++++++-
.../pg_stat_statements/pg_stat_statements.control  |  2 +-
.../pg_stat_statements/sql/pg_stat_statements.sql  |  6 +++
doc/src/sgml/pgstatstatements.sgml                 | 61 ++++++++++++++++++++--
src/tools/pgindent/typedefs.list                   |  1 +
8 files changed, 155 insertions(+), 8 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-11-26 12:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 14:23 pgsql: pg_stat_statements: track number of rows processed by some utili Fujii Masao <fujii@postgresql.org>
2020-11-12 02:27 pgsql: pg_stat_statements: track number of rows processed by REFRESH MA Fujii Masao <fujii@postgresql.org>
2020-11-26 12:20 pgsql: pg_stat_statements: Track number of times pgss entries were deal Fujii Masao <fujii@postgresql.org>

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