From de3a2ea3b264a5625cda6d8968f75e9bfb4dbdcb Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 9 Oct 2024 08:07:48 +0900 Subject: Introduce two fields in EState to track parallel worker activity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These fields can be set by executor nodes to record how many parallel workers were planned to be launched and how many of them have been actually launched within the number initially planned. This data is able to give an approximation of the parallel worker draught a system is facing, making easier the tuning of related configuration parameters. These fields will be used by some follow-up patches to populate other parts of the system with their data. Author: Guillaume Lelarge, Benoit Lobréau Discussion: https://postgr.es/m/783bc7f7-659a-42fa-99dd-ee0565644e25@dalibo.com Discussion: https://postgr.es/m/CAECtzeWtTGOK0UgKXdDGpfTVSa5bd_VbUt6K6xn8P7X+_dZqKw@mail.gmail.com --- src/backend/executor/execUtils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/executor/execUtils.c') diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 5737f9f4ebd..6712302ec8c 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -158,6 +158,8 @@ CreateExecutorState(void) estate->es_sourceText = NULL; estate->es_use_parallel_mode = false; + estate->es_parallel_workers_to_launch = 0; + estate->es_parallel_workers_launched = 0; estate->es_jit_flags = 0; estate->es_jit = NULL; -- cgit v1.2.3