From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Euler Taveira <euler(at)eulerto(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: log_min_messages per backend type |
Date: | 2025-03-06 13:20:31 |
Message-ID: | CAFY6G8fCNvUJwR0NEyE3SNx4_btC_6KULj03KvF_eeo9zQ5UKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
>
> On 2025-03-04 Tu 7:33 PM, Euler Taveira wrote:
>>> I think it should be acceptable to configure one global setting with
>>> exceptions for particular backend types:
>>>
>>> log_min_messages = WARNING, autovacuum:DEBUG1
>>>
>>> Right now I think the code only accepts the unadorned log level if
>>> there
>>> are no other items in the list. I think the proposal downthread is to
>>> use the keyword ALL for this,
>>>
>>> log_min_messages = all:WARNING, autovacuum:DEBUG1 # I don't
>>> like this
>>>
>>> but I think it's inferior, because then "all" is not really "all",
>>> and I
>>> think it would be different if I had said
>>>
>>> log_min_messages = autovacuum:DEBUG1, all:WARNING # I don't
>>> like this
>>>
>>> because it looks like the "all" entry should override the one I set
>>> for
>>> autovacuum before, which frankly would not make sense to me.
>>
>> Good point. After reflection, I agree that "all" is not a good keyword.
>> This patch turns backend type as optional so WARNING means apply this
>> log level as a final step to the backend types that are not
>> specified in
>> the list.
>>
>>> So I think these two lines,
>>>
>>> log_min_messages = WARNING, autovacuum:DEBUG1
>>> log_min_messages = autovacuum:DEBUG1, WARNING
>>>
>>> should behave identically and mean "set the level for autovacuum to
>>> DEBUG1, and to any other backend type to WARNING.
>>
>> Done.
>
>
> Just bikeshedding a bit ...
>
> I'm not mad keen on this design. I think the value should be either a
> single setting like "WARNING" or a set of type:setting pairs. I agree
> that "all" is a bad name, but I think "default" would make sense.
>
> I can live with it but I think this just looks a bit odd.
>
Just bringing some thoughts about it...
How about using something like *:WARNING? I'm not sure if it could also be
confusing as the "all" keyword, but I think it could also be interpreted as
"anything else use WARNING".
--
Matheus Alcantara
From | Date | Subject | |
---|---|---|---|
Next Message | Matthias van de Meent | 2025-03-06 13:30:13 | Re: explain analyze rows=%.0f |
Previous Message | Alena Rybakina | 2025-03-06 13:17:44 | Re: explain analyze rows=%.0f |