Re: Logging parallel worker draught

Benoit Lobréau <benoit.lobreau@dalibo.com>

From: Benoit Lobréau <benoit.lobreau@dalibo.com>
To: Andrei Lepikhov <lepihov@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: solai.cdac@gmail.com, alvherre@kurilemu.de
Date: 2026-06-23T13:47:34Z
Lists: pgsql-hackers
Hi thanks for taking a look at this patch,


On 6/23/26 3:28 PM, Andrei Lepikhov wrote:
> On 13/04/2026 11:44, Benoit Lobréau wrote:
>> This is the v11 of the patch (rebase).
> I wonder, what is the actual reason to report after the operation ended? What if
> the operation has been interrupted? We will not see the report at all. Maybe it
> is better to do after the launch: we successfully acquired worker slot, and
> that's what we actually wanted to know, isn't it?

At the beginning the patch did exactly that (at the node level), but it 
lead to many
reports for the same query and it was suggested that query level results 
would be
better.

> Also, I don't understand why log_parallel_workers has exactly these options, and
> there is no documentation explaining the reasoning. Generally, I'd prefer the
> log level here - it would be easier to write tests as well.

For this feature, my idea was to have a way to get informations on 
parallelism during
audits. Changing the log level would not be appropriate for this in my 
opinion. I view
it as another tool to investigate a specific area: like log_temp_files etc..
Both solutions where proposed here:

https://www.postgresql.org/message-id/flat/1a8ad1cc-8e6c-4e97-a8c2-55430b39754f%40gmail.com#9b8449d00dee86234adbc8ca25a1f223

Let me know if you have more questions.

-- 
Benoit Lobréau
Consultant
http://dalibo.com