Re: Logging parallel worker draught
Benoit Lobréau <benoit.lobreau@dalibo.com>
From: Benoit Lobréau <benoit.lobreau@dalibo.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: Tomas Vondra <tomas@vondra.me>, Guillaume Lelarge
<guillaume@lelarge.info>, Alena Rybakina <a.rybakina@postgrespro.ru>,
pgsql-hackers <pgsql-hackers@postgresql.org>,
"Imseih (AWS), Sami" <simseih@amazon.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Robert Haas
<robertmhaas@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>,
Melanie Plageman <melanieplageman@gmail.com>,
"Andrey M. Borodin" <x4mmm@yandex-team.ru>
Date: 2025-01-20T15:53:23Z
Lists: pgsql-hackers
Attachments
- V6_0001-Add-a-guc-for-parallel-worker-logging.patch (text/x-patch) patch 0001
- V6_0002-Implements-logging-for-parallel-worker-usage-in-inde.patch (text/x-patch) patch 0002
- V6_0003-Setup-counters-for-parallel-vacuums.patch (text/x-patch) patch 0003
- V6_0004-Implements-logging-for-parallel-worker-usage-in-vacu.patch (text/x-patch) patch 0004
- V6_0005-Implements-logging-for-parallel-worker-usage-in-quer.patch (text/x-patch) patch 0005
Here is a new set of patches. The following changed: * rebase * simplify the log message to go back to "launched X parallel workers (planned: Y)" * rename the "failure" configuration item to "shortage". On 1/3/25 17:24, Sami Imseih wrote:> Maintenance work is usually planned, so if queries > issues by the applications are not launching enough workers, it's > easy to point the blame on the maintenance activity. I often work on systems I have no prior knowledge of. Some of these systems have external schedulers. Having information in PostgreSQL's logs is really useful in such cases. > Maybe it's better to log parallel maintenance workers separately actually > if there is a truly good justification for it. As it stands now, even > pg_stat_database > does not track maintenance workers. Maybe adding logging could also be part > of that discussion? The original patch on pg_stat_database included this information. I still think that having a centralized way to get the information is important, whether in the logs and/or pg_stat_database (preferably both). I feel that observability is important, and I don't understand why we would want to have the information for only a portion of the functionality's usage (even if it's the most important). -- Benoit Lobréau Consultant http://dalibo.com