Re: Logging parallel worker draught

From: Benoit Lobréau <benoit(dot)lobreau(at)dalibo(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Subject: Re: Logging parallel worker draught
Date: 2025-01-20 15:53:23
Message-ID: 57c9576f-9689-4667-825d-fd2bec43c793@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
V6_0001-Add-a-guc-for-parallel-worker-logging.patch text/x-patch 6.6 KB
V6_0002-Implements-logging-for-parallel-worker-usage-in-inde.patch text/x-patch 1.9 KB
V6_0003-Setup-counters-for-parallel-vacuums.patch text/x-patch 1.6 KB
V6_0004-Implements-logging-for-parallel-worker-usage-in-vacu.patch text/x-patch 1005 bytes
V6_0005-Implements-logging-for-parallel-worker-usage-in-quer.patch text/x-patch 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2025-01-20 15:58:30 Re: Statistics Import and Export
Previous Message Sami Imseih 2025-01-20 15:35:22 Re: Bug in detaching a partition with a foreign key.