Hi, On Fri, Jul 29, 2022 at 08:36:44AM -0500, Daymel Bonne Solís wrote: > > We have rewritten the patch and added the necessary columns to have the > number of times a parallel query plan was not executed using parallelism. > > We are investigating how to add more information related to the workers > created > by the Gather/GatherMerge nodes, but it is not a trivial task.
As far as I can see the scope of the counters is now different. You said you wanted to be able to identify when a parallel query plan cannot be executed with parallelism, but what the fields are now showing is simply whether no workers were launched at all. It could be because of the dbeaver behavior you mentioned (the !es_use_parallel_mode case), but also if the executor did try to launch parallel workers and didn't get any. I don't think that's an improvement. With this patch if you see the "paral_planned_not_exec" counter going up, you still don't know if this is because of the !es_use_parallel_mode or if you simply have too many parallel queries running at the same time, or both, and therefore can't do much with that information. Both situations are different and in my opinion require different (and specialized) counters to properly handle them. Also, I don't think that paral_planned_exec and paral_planned_not_exec are good column (and variable) names. Maybe something like "parallel_exec_count" and "forced_non_parallel_exec_count" (assuming it's based on a parallel plan and !es_use_parallel_mode).