Re: Logging parallel worker draught

From: Benoit Lobréau <benoit(dot)lobreau(at)dalibo(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: Logging parallel worker draught
Date: 2023-05-02 10:44:58
Message-ID: 3ed1b53c-15c0-5638-a059-69bd6a2fb11d@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5/1/23 18:33, Robert Haas wrote:
> Why not? It seems like something some people might want to log and
> others not. Running the whole server at DEBUG1 to get this information
> doesn't seem like a suitable answer.

Since the statement is also logged, it could spam the log with huge
queries, which might also be a reason to stop logging this kind of
problems until the issue is fixed.

I attached the patch without the guc anyway just in case.

> What I was wondering was whether we would be better off putting this
> into the statistics collector, vs. doing it via logging. Both
> approaches seem to have pros and cons.

We tried to explore different options with my collegues in another
thread [1]. I feel like both solutions are worthwhile, and would be
helpful. I plan to take a look at the pg_stat_statement patch [2] next.

Since it's my first patch, I elected to choose the easiest solution to
implement first. I also proposed this because I think logging can help
pinpoint a lot of problems at a minimal cost, since it is easy to setup
and exploit for everyone, everywhere

[1]
https://www.postgresql.org/message-id/d657df20-c4bf-63f6-e74c-cb85a81d0383@dalibo.com

[2]
https://www.postgresql.org/message-id/flat/6acbe570-068e-bd8e-95d5-00c737b865e8%40gmail.com

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

Attachment Content-Type Size
0001-Add-logging-for-exceeded-parallel-worker-slot-limits.patch_v2_no_guc text/plain 1.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dagfinn Ilmari Mannsåker 2023-05-02 10:48:43 Re: Tab completion for CREATE SCHEMAAUTHORIZATION
Previous Message Peter Eisentraut 2023-05-02 08:47:21 Re: min/max aggregation for jsonb