From e7a9496de90657e2161f68b3a5a9b2d9b0b7bb07 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 11 Nov 2024 10:40:48 +0900 Subject: Add two attributes to pg_stat_database for parallel workers activity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two attributes are added to pg_stat_database: * parallel_workers_to_launch, counting the total number of parallel workers that were planned to be launched. * parallel_workers_launched, counting the total number of parallel workers actually launched. The ratio of both fields can provide hints that there are not enough slots available when launching parallel workers, also useful when pg_stat_statements is not deployed on an instance (i.e. cf54a2c00254). This commit relies on de3a2ea3b264, that has added two fields to EState, that get incremented when executing Gather or GatherMerge nodes. A test is added in select_parallel, where parallel workers are spawned. Bump catalog version. Author: Benoit Lobréau Discussion: https://postgr.es/m/783bc7f7-659a-42fa-99dd-ee0565644e25@dalibo.com --- doc/src/sgml/monitoring.sgml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 331315f8d3c..840d7f81615 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -3611,6 +3611,24 @@ description | Waiting for a newly initialized WAL file to reach durable storage + + + parallel_workers_to_launch bigint + + + Number of parallel workers planned to be launched by queries on this database + + + + + + parallel_workers_launched bigint + + + Number of parallel workers launched by queries on this database + + + stats_reset timestamp with time zone -- cgit v1.2.3