From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_stat_statements: Add columns to track parallel worker activit
Date: Tue, 08 Oct 2024 23:31:29 +0000
Message-ID: <E1syJft-002lX5-16@gemulon.postgresql.org> (raw)
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(-)
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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_stat_statements: Add columns to track parallel worker activit
In-Reply-To: <E1syJft-002lX5-16@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