Re: Add parallel columns for seq scan and index scan on pg_stat_all_tables and _indexes

Alena Rybakina <a.rybakina@postgrespro.ru>

From: Alena Rybakina <a.rybakina@postgrespro.ru>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-06T21:43:18Z
Lists: pgsql-hackers
Hi!

> Finally found some time to work on this. Tests added on v5 patch 
> (attached).
Maybe I'm not aware of the whole context of the thread and maybe my 
questions will seem a bit stupid, but honestly
it's not entirely clear to me how this statistics will help to adjust 
the number of parallel workers.
We may have situations when during overestimation of the cardinality 
during query optimization a several number of parallel workers were 
unjustifiably generated and vice versa -
due to a high workload only a few number of workers were generated.
How do we identify such cases so as not to increase or decrease the 
number of parallel workers when it is not necessary?

-- 
Regards,
Alena Rybakina
Postgres Professional