From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: pg_stat_statements: Add columns to track parallel worker activit |
Date: | 2024-10-08 23:31:29 |
Message-ID: | E1syJft-002lX5-16@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
pg_stat_statements: Add columns to track parallel worker activity
The view pg_stat_statements gains two columns:
- parallel_workers_to_launch, the number of parallel workers planned to
be launched.
- parallel_workers_launched, the number of parallel workers actually
launched.
The ratio of both columns offers hints that parallel workers are lacking
on a per-statement basis, requiring some tuning, in coordination with
"calls", the number of times a query is executed.
As of now, these numbers are tracked within Gather and GatherMerge
nodes. They could be extended to utilities that make use of parallel
workers (parallel btree and brin, VACUUM).
The module is bumped to 1.12.
Author: Guillaume Lelarge
Discussion: https://postgr.es/m/CAECtzeWtTGOK0UgKXdDGpfTVSa5bd_VbUt6K6xn8P7X+_dZqKw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cf54a2c002544a4b7934deb44c895750aadb0a3c
Modified Files
--------------
contrib/pg_stat_statements/Makefile | 6 +-
.../pg_stat_statements/expected/oldextversions.out | 64 ++++++++++++++++++
contrib/pg_stat_statements/expected/parallel.out | 34 ++++++++++
contrib/pg_stat_statements/meson.build | 2 +
.../pg_stat_statements--1.11--1.12.sql | 75 ++++++++++++++++++++++
contrib/pg_stat_statements/pg_stat_statements.c | 60 +++++++++++++++--
.../pg_stat_statements/pg_stat_statements.control | 2 +-
contrib/pg_stat_statements/sql/oldextversions.sql | 5 ++
contrib/pg_stat_statements/sql/parallel.sql | 26 ++++++++
doc/src/sgml/pgstatstatements.sgml | 18 ++++++
10 files changed, 281 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-10-08 23:47:00 | pgsql: Allow roles created by new test to log in under SSPI. |
Previous Message | Michael Paquier | 2024-10-08 23:14:51 | pgsql: Introduce two fields in EState to track parallel worker activity |